mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
15 lines
388 B
Plaintext
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
|
|
|