+error: index out of bounds: the len is 4 but the index is 4
+ --> $DIR/indexing_slicing.rs:28:5
+ |
+28 | x[4]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
+ | ^^^^
+ |
+ = note: #[deny(const_err)] on by default
+
+error: index out of bounds: the len is 4 but the index is 8
+ --> $DIR/indexing_slicing.rs:29:5
+ |
+29 | x[1 << 3]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
+ | ^^^^^^^^^
+
+error: index out of bounds: the len is 0 but the index is 0
+ --> $DIR/indexing_slicing.rs:59:5
+ |
+59 | empty[0]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
+ | ^^^^^^^^
+
+error: index out of bounds: the len is 4 but the index is 15
+ --> $DIR/indexing_slicing.rs:90:5
+ |
+90 | x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
+ | ^^^^
+
error: indexing may panic.
--> $DIR/indexing_slicing.rs:23:5
|
98 | &x[10..num]; // should trigger out of bounds error
| ^^
-error: aborting due to 39 previous errors
+error: aborting due to 43 previous errors