about summary refs log tree commit diff
path: root/tests/ui/indexing/index-bounds.stderr
blob: 51d8c7567a46a78daedffe48c6c7d61cec360d09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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