File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 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
22 --> $DIR/indexing_slicing_index.rs:11:5
33 |
44LL | 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
66 |
7- = note: `#[deny(const_err )]` on by default
7+ = note: `#[deny(unconditional_panic )]` on by default
88
9- error: index out of bounds: the len is 4 but the index is 8
9+ error: this operation will panic at runtime
1010 --> $DIR/indexing_slicing_index.rs:12:5
1111 |
1212LL | 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
1414
15- error: index out of bounds: the len is 4 but the index is 15
15+ error: this operation will panic at runtime
1616 --> $DIR/indexing_slicing_index.rs:27:5
1717 |
1818LL | 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
2020
2121error: indexing may panic.
2222 --> $DIR/indexing_slicing_index.rs:10:5
You can’t perform that action at this time.
0 commit comments