]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-len-underflow-separate-spans.stderr
Rollup merge of #100861 - RalfJung:const-ice, r=oli-obk
[rust.git] / src / test / ui / consts / const-len-underflow-separate-spans.stderr
1 error: any use of this value will cause an error
2   --> $DIR/const-len-underflow-separate-spans.rs:7:20
3    |
4 LL | const LEN: usize = ONE - TWO;
5    | ----------------   ^^^^^^^^^ attempt to compute `1_usize - 2_usize`, which would overflow
6    |
7    = note: `#[deny(const_err)]` on by default
8    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
10
11 error[E0080]: evaluation of constant value failed
12   --> $DIR/const-len-underflow-separate-spans.rs:12:17
13    |
14 LL |     let a: [i8; LEN] = unimplemented!();
15    |                 ^^^ referenced constant has errors
16
17 error: aborting due to 2 previous errors
18
19 For more information about this error, try `rustc --explain E0080`.
20 Future incompatibility report: Future breakage diagnostic:
21 error: any use of this value will cause an error
22   --> $DIR/const-len-underflow-separate-spans.rs:7:20
23    |
24 LL | const LEN: usize = ONE - TWO;
25    | ----------------   ^^^^^^^^^ attempt to compute `1_usize - 2_usize`, which would overflow
26    |
27    = note: `#[deny(const_err)]` on by default
28    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
29    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
30