]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/miri_unleashed/assoc_const.stderr
Rollup merge of #98640 - cuviper:stable-rust-analyzer, r=Mark-Simulacrum
[rust.git] / src / test / ui / consts / miri_unleashed / assoc_const.stderr
1 error[E0080]: erroneous constant used
2   --> $DIR/assoc_const.rs:31:13
3    |
4 LL |     let y = <String as Bar<Vec<u32>, String>>::F;
5    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
6
7 warning: skipping const checks
8    |
9 help: skipping check that does not even have a feature gate
10   --> $DIR/assoc_const.rs:14:20
11    |
12 LL |     const F: u32 = (U::X, 42).1;
13    |                    ^^^^^^^^^^
14
15 error: aborting due to previous error; 1 warning emitted
16
17 For more information about this error, try `rustc --explain E0080`.
18 Future incompatibility report: Future breakage diagnostic:
19 warning: any use of this value will cause an error
20   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
21    |
22 LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
23    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24    | |
25    | calling non-const function `<Vec<u32> as Drop>::drop`
26    | inside `std::ptr::drop_in_place::<Vec<u32>> - shim(Some(Vec<u32>))` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
27    | inside `std::ptr::drop_in_place::<(Vec<u32>, u32)> - shim(Some((Vec<u32>, u32)))` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
28    | inside `<String as Bar<Vec<u32>, String>>::F` at $DIR/assoc_const.rs:14:31
29    |
30   ::: $DIR/assoc_const.rs:14:5
31    |
32 LL |     const F: u32 = (U::X, 42).1;
33    |     ----------------------------
34    |
35 note: the lint level is defined here
36   --> $DIR/assoc_const.rs:4:10
37    |
38 LL | #![allow(const_err)]
39    |          ^^^^^^^^^
40    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
41    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
42