File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 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+
121error: 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
You can’t perform that action at this time.
0 commit comments