]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error: index out of bounds: the len is 3 but the index is 4 |
2 | --> $DIR/array-literal-index-oob.rs:2:7 | |
3 | | | |
4 | LL | &{[1, 2, 3][4]}; | |
5 | | ^^^^^^^^^^^^ | |
6 | | | |
416331ca | 7 | = note: `#[deny(const_err)]` on by default |
48663c56 | 8 | |
dc9dc135 XL |
9 | error: this expression will panic at runtime |
10 | --> $DIR/array-literal-index-oob.rs:2:5 | |
11 | | | |
12 | LL | &{[1, 2, 3][4]}; | |
13 | | ^^^^^^^^^^^^^^^ index out of bounds: the len is 3 but the index is 4 | |
14 | ||
48663c56 XL |
15 | error: reaching this expression at runtime will panic or abort |
16 | --> $DIR/array-literal-index-oob.rs:2:7 | |
17 | | | |
18 | LL | &{[1, 2, 3][4]}; | |
19 | | --^^^^^^^^^^^^- | |
20 | | | | |
21 | | index out of bounds: the len is 3 but the index is 4 | |
22 | ||
dc9dc135 | 23 | error: aborting due to 3 previous errors |
48663c56 | 24 |