]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err.stderr
0ee9ecdef451dc9cbbc9046b337674e9e25f2c9e
[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:15
17    |
18 LL |     black_box((FOO, FOO));
19    |               ^^^^^^^^^^ referenced constant has errors
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0080`.