File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
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
1
+ error: this operation will panic at runtime
2
2
--> $DIR/indexing_slicing_index.rs:11:5
3
3
|
4
4
LL | x[4]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
5
- | ^^^^
5
+ | ^^^^ index out of bounds: the len is 4 but the index is 4
6
6
|
7
- = note: `#[deny(const_err )]` on by default
7
+ = note: `#[deny(unconditional_panic )]` on by default
8
8
9
- error: index out of bounds: the len is 4 but the index is 8
9
+ error: this operation will panic at runtime
10
10
--> $DIR/indexing_slicing_index.rs:12:5
11
11
|
12
12
LL | x[1 << 3]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
13
- | ^^^^^^^^^
13
+ | ^^^^^^^^^ index out of bounds: the len is 4 but the index is 8
14
14
15
- error: index out of bounds: the len is 4 but the index is 15
15
+ error: this operation will panic at runtime
16
16
--> $DIR/indexing_slicing_index.rs:27:5
17
17
|
18
18
LL | x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
19
- | ^^^^
19
+ | ^^^^ index out of bounds: the len is 4 but the index is 15
20
20
21
21
error: indexing may panic.
22
22
--> $DIR/indexing_slicing_index.rs:10:5
You can’t perform that action at this time.
0 commit comments