rust/tests/ui/indexing/index-bounds.stderr

17 lines
540 B
Plaintext
Raw Normal View History

2024-05-31 20:40:46 -05:00
error: this operation will panic at runtime
--> $DIR/index-bounds.rs:4:14
|
LL | let _n = [64][200];
| ^^^^^^^^^ index out of bounds: the length is 1 but the index is 200
|
= note: `#[deny(unconditional_panic)]` on by default
error: this operation will panic at runtime
--> $DIR/index-bounds.rs:8:14
|
LL | let _n = [64][u32::MAX as usize - 1];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 4294967294
error: aborting due to 2 previous errors