]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/const-eval-overflow-2.stderr
merge rustc history
[rust.git] / src / test / ui / consts / const-eval / const-eval-overflow-2.stderr
1 error: could not evaluate constant pattern
2   --> $DIR/const-eval-overflow-2.rs:15:9
3    |
4 LL |         NEG_NEG_128 => println!("A"),
5    |         ^^^^^^^^^^^
6
7 error: could not evaluate constant pattern
8   --> $DIR/const-eval-overflow-2.rs:15:9
9    |
10 LL |         NEG_NEG_128 => println!("A"),
11    |         ^^^^^^^^^^^
12
13 error: aborting due to 2 previous errors
14
15 Future incompatibility report: Future breakage diagnostic:
16 warning: any use of this value will cause an error
17   --> $DIR/const-eval-overflow-2.rs:11:25
18    |
19 LL | const NEG_NEG_128: i8 = -NEG_128;
20    | ---------------------   ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
21    |
22 note: the lint level is defined here
23   --> $DIR/const-eval-overflow-2.rs:4:36
24    |
25 LL | #![allow(unused_imports, warnings, const_err)]
26    |                                    ^^^^^^^^^
27    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
28    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
29