]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err.stderr
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[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:10:17
3    |
4 LL | const FOO: u8 = [5u8][1];
5    | ----------------^^^^^^^^-
6    |                 |
7    |                 index out of bounds: the len is 1 but the index is 1
8    |
9 note: lint level defined here
10   --> $DIR/const-err.rs:4:9
11    |
12 LL | #![warn(const_err)]
13    |         ^^^^^^^^^
14
15 error[E0080]: erroneous constant used
16   --> $DIR/const-err.rs:14:16
17    |
18 LL |     black_box((FOO, FOO));
19    |                ^^^ referenced constant has errors
20
21 error[E0080]: erroneous constant used
22   --> $DIR/const-err.rs:14:21
23    |
24 LL |     black_box((FOO, FOO));
25    |                     ^^^ referenced constant has errors
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0080`.