1 error: this operation will panic at runtime
2 --> $DIR/indexing_slicing_index.rs:11:5
4 LL | x[4]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
5 | ^^^^ index out of bounds: the len is 4 but the index is 4
7 = note: `#[deny(unconditional_panic)]` on by default
9 error: this operation will panic at runtime
10 --> $DIR/indexing_slicing_index.rs:12:5
12 LL | x[1 << 3]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
13 | ^^^^^^^^^ index out of bounds: the len is 4 but the index is 8
15 error: this operation will panic at runtime
16 --> $DIR/indexing_slicing_index.rs:27:5
18 LL | x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
19 | ^^^^ index out of bounds: the len is 4 but the index is 15
21 error: indexing may panic.
22 --> $DIR/indexing_slicing_index.rs:10:5
27 = note: `-D clippy::indexing-slicing` implied by `-D warnings`
28 = help: Consider using `.get(n)` or `.get_mut(n)` instead
30 error: indexing may panic.
31 --> $DIR/indexing_slicing_index.rs:18:5
36 = help: Consider using `.get(n)` or `.get_mut(n)` instead
38 error: indexing may panic.
39 --> $DIR/indexing_slicing_index.rs:21:5
44 = help: Consider using `.get(n)` or `.get_mut(n)` instead
46 error: indexing may panic.
47 --> $DIR/indexing_slicing_index.rs:22:5
52 = help: Consider using `.get(n)` or `.get_mut(n)` instead
54 error: indexing may panic.
55 --> $DIR/indexing_slicing_index.rs:23:5
60 = help: Consider using `.get(n)` or `.get_mut(n)` instead
62 error: indexing may panic.
63 --> $DIR/indexing_slicing_index.rs:29:5
68 = help: Consider using `.get(n)` or `.get_mut(n)` instead
70 error: indexing may panic.
71 --> $DIR/indexing_slicing_index.rs:30:5
76 = help: Consider using `.get(n)` or `.get_mut(n)` instead
78 error: aborting due to 10 previous errors