rust/tests/ui/consts/array-literal-index-oob.stderr
2023-01-11 09:32:08 +00:00

15 lines
388 B
Plaintext

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