1 warning: any use of this value will cause an error
2 --> $DIR/const-err.rs:11:17
4 LL | const FOO: u8 = [5u8][1];
5 | ----------------^^^^^^^^-
7 | index out of bounds: the len is 1 but the index is 1
9 note: the lint level is defined here
10 --> $DIR/const-err.rs:5:9
12 LL | #![warn(const_err)]
15 error[E0080]: erroneous constant used
16 --> $DIR/const-err.rs:15:16
18 LL | black_box((FOO, FOO));
19 | ^^^ referenced constant has errors
21 error[E0080]: erroneous constant used
22 --> $DIR/const-err.rs:15:21
24 LL | black_box((FOO, FOO));
25 | ^^^ referenced constant has errors
27 error: aborting due to 2 previous errors
29 For more information about this error, try `rustc --explain E0080`.