Skip to content

Commit acbc609

Browse files
committed
Auto merge of #4929 - matthiaskrgr:rustup_25, r=matthiaskrgr
rustup rust-lang/rust#67130 changelog: none
2 parents abdb277 + 907078a commit acbc609

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

tests/ui/indexing_slicing.stderr

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
error: index out of bounds: the len is 4 but the index is 4
2+
--> $DIR/indexing_slicing.rs:18:5
3+
|
4+
LL | x[4]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
5+
| ^^^^
6+
|
7+
= note: `#[deny(const_err)]` on by default
8+
9+
error: index out of bounds: the len is 4 but the index is 8
10+
--> $DIR/indexing_slicing.rs:19:5
11+
|
12+
LL | x[1 << 3]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
13+
| ^^^^^^^^^
14+
15+
error: index out of bounds: the len is 4 but the index is 15
16+
--> $DIR/indexing_slicing.rs:54:5
17+
|
18+
LL | x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
19+
| ^^^^
20+
121
error: indexing may panic.
222
--> $DIR/indexing_slicing.rs:13:5
323
|
@@ -189,5 +209,5 @@ LL | v[M];
189209
|
190210
= help: Consider using `.get(n)` or `.get_mut(n)` instead
191211

192-
error: aborting due to 24 previous errors
212+
error: aborting due to 27 previous errors
193213

0 commit comments

Comments
 (0)