]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/erroneous_const2.stderr
Rollup merge of #101642 - SkiFire13:fix-inplace-collection-leak, r=the8472
[rust.git] / src / tools / miri / tests / fail / erroneous_const2.stderr
1 error: any use of this value will cause an error
2   --> $DIR/erroneous_const2.rs:LL:CC
3    |
4 LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
5    | --------------    ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
6    |
7    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
9    = note: `#[deny(const_err)]` on by default
10
11 error[E0080]: evaluation of constant value failed
12   --> $DIR/erroneous_const2.rs:LL:CC
13    |
14 LL |     println!("{}", FOO);
15    |                    ^^^ referenced constant has errors
16
17 error: erroneous constant used
18   --> $DIR/erroneous_const2.rs:LL:CC
19    |
20 LL |     println!("{}", FOO);
21    |                    ^^^ referenced constant has errors
22    |
23    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
24    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
25    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
26
27 error: post-monomorphization error: referenced constant has errors
28   --> $DIR/erroneous_const2.rs:LL:CC
29    |
30 LL |     println!("{}", FOO);
31    |                    ^^^ referenced constant has errors
32    |
33    = note: inside `main` at $DIR/erroneous_const2.rs:LL:CC
34
35 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
36
37 error: aborting due to 4 previous errors
38
39 For more information about this error, try `rustc --explain E0080`.