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 length 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)]
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>
17 error[E0080]: erroneous constant used
18 --> $DIR/const-err.rs:16:16
20 LL | black_box((FOO, FOO));
21 | ^^^ referenced constant has errors
23 error[E0080]: erroneous constant used
24 --> $DIR/const-err.rs:16:21
26 LL | black_box((FOO, FOO));
27 | ^^^ referenced constant has errors
29 error: aborting due to 2 previous errors; 1 warning emitted
31 For more information about this error, try `rustc --explain E0080`.