summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/array-literal-index-oob.stderr
blob: 54bf3af81e8ff5d285a66df0f3c7155905458af3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
warning: this operation will panic at runtime
  --> $DIR/array-literal-index-oob.rs:7:8
   |
LL |     &{ [1, 2, 3][4] };
   |        ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
   |
note: the lint level is defined here
  --> $DIR/array-literal-index-oob.rs:4:9
   |
LL | #![warn(unconditional_panic)]
   |         ^^^^^^^^^^^^^^^^^^^

warning: 1 warning emitted