1 error[E0080]: referenced constant has errors
2 --> $DIR/const-err.rs:29:15
4 LL | const FOO: u8 = [5u8][1];
5 | -------- index out of bounds: the len is 1 but the index is 1
7 LL | black_box((FOO, FOO));
10 error[E0080]: could not evaluate constant
11 --> $DIR/const-err.rs:29:15
13 LL | black_box((FOO, FOO));
14 | ^^^^^^^^^^ referenced constant has errors
16 error[E0080]: constant evaluation error
17 --> $DIR/const-err.rs:24:1
19 LL | const FOO: u8 = [5u8][1];
20 | ^^^^^^^^^^^^^^^^--------^
22 | index out of bounds: the len is 1 but the index is 1
24 error: aborting due to 3 previous errors
26 For more information about this error, try `rustc --explain E0080`.