fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
493 B18 linesraw
1error: index out of bounds: the len is 3 but the index is 4
2  --> $DIR/array-literal-index-oob.rs:2:7
3   |
4LL |     &{[1, 2, 3][4]};
5   |       ^^^^^^^^^^^^
6   |
7   = note: `#[deny(const_err)]` on by default
8
9error: reaching this expression at runtime will panic or abort
10  --> $DIR/array-literal-index-oob.rs:2:7
11   |
12LL |     &{[1, 2, 3][4]};
13   |     --^^^^^^^^^^^^-
14   |       |
15   |       indexing out of bounds: the len is 3 but the index is 4
16
17error: aborting due to 2 previous errors
18