]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/array-literal-index-oob.stderr
Rollup merge of #98609 - TaKO8Ki:fix-ice-for-associated-constant-generics, r=lcnr
[rust.git] / src / test / ui / consts / array-literal-index-oob.stderr
1 warning: this operation will panic at runtime
2   --> $DIR/array-literal-index-oob.rs:7:8
3    |
4 LL |     &{ [1, 2, 3][4] };
5    |        ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
6    |
7 note: the lint level is defined here
8   --> $DIR/array-literal-index-oob.rs:4:20
9    |
10 LL | #![warn(const_err, unconditional_panic)]
11    |                    ^^^^^^^^^^^^^^^^^^^
12
13 warning: 1 warning emitted
14