1 warning: this operation will panic at runtime
2 --> $DIR/array-literal-index-oob.rs:7:8
4 LL | &{ [1, 2, 3][4] };
5 | ^^^^^^^^^^^^ index out of bounds: the len is 3 but the index is 4
7 note: the lint level is defined here
8 --> $DIR/array-literal-index-oob.rs:4:20
10 LL | #![warn(const_err, unconditional_panic)]
13 warning: reaching this expression at runtime will panic or abort
14 --> $DIR/array-literal-index-oob.rs:7:8
16 LL | &{ [1, 2, 3][4] };
19 | indexing out of bounds: the len is 3 but the index is 4
21 note: the lint level is defined here
22 --> $DIR/array-literal-index-oob.rs:4:9
24 LL | #![warn(const_err, unconditional_panic)]
27 warning: erroneous constant used
28 --> $DIR/array-literal-index-oob.rs:7:5
30 LL | &{ [1, 2, 3][4] };
31 | ^^^^^^^^^^^^^^^^^ referenced constant has errors
33 warning: 3 warnings emitted