summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/array-literal-index-oob.stderr
blob: f96b8d48b3e7c469c5aac26a17b3b3cdb766dfd0 (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:20
   |
LL | #![warn(const_err, unconditional_panic)]
   |                    ^^^^^^^^^^^^^^^^^^^

warning: 1 warning emitted