]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err.stderr
Rollup merge of #98540 - TaKO8Ki:add-regression-test-for-87558, r=Mark-Simulacrum
[rust.git] / src / test / ui / consts / const-err.stderr
1 warning: any use of this value will cause an error
2   --> $DIR/const-err.rs:11:17
3    |
4 LL | const FOO: u8 = [5u8][1];
5    | ----------------^^^^^^^^-
6    |                 |
7    |                 index out of bounds: the length is 1 but the index is 1
8    |
9 note: the lint level is defined here
10   --> $DIR/const-err.rs:5:9
11    |
12 LL | #![warn(const_err)]
13    |         ^^^^^^^^^
14    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
15    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
16
17 error[E0080]: erroneous constant used
18   --> $DIR/const-err.rs:16:16
19    |
20 LL |     black_box((FOO, FOO));
21    |                ^^^ referenced constant has errors
22
23 error[E0080]: erroneous constant used
24   --> $DIR/const-err.rs:16:21
25    |
26 LL |     black_box((FOO, FOO));
27    |                     ^^^ referenced constant has errors
28
29 error: aborting due to 2 previous errors; 1 warning emitted
30
31 For more information about this error, try `rustc --explain E0080`.
32 Future incompatibility report: Future breakage diagnostic:
33 warning: any use of this value will cause an error
34   --> $DIR/const-err.rs:11:17
35    |
36 LL | const FOO: u8 = [5u8][1];
37    | ----------------^^^^^^^^-
38    |                 |
39    |                 index out of bounds: the length is 1 but the index is 1
40    |
41 note: the lint level is defined here
42   --> $DIR/const-err.rs:5:9
43    |
44 LL | #![warn(const_err)]
45    |         ^^^^^^^^^
46    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
47    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
48