rust/tests/ui/consts/array-literal-index-oob.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
388 B
Plaintext
Raw Normal View History

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
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2022-09-21 11:05:20 +00:00
--> $DIR/array-literal-index-oob.rs:4:9
|
2022-09-21 11:05:20 +00:00
LL | #![warn(unconditional_panic)]
| ^^^^^^^^^^^^^^^^^^^
warning: 1 warning emitted