@@ -9,18 +9,6 @@ LL | const REF: &i32 = &ARR[idx()]; // This should be linted, since `suppress-re
99 = note: `-D clippy::indexing-slicing` implied by `-D warnings`
1010 = help: to override `-D warnings` add `#[allow(clippy::indexing_slicing)]`
1111
12- error[E0080]: evaluation of `main::{constant#3}` failed
13- --> tests/ui/indexing_slicing_index.rs:69:14
14- |
15- LL | const { &ARR[idx4()] };
16- | ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
17-
18- note: erroneous constant encountered
19- --> tests/ui/indexing_slicing_index.rs:69:5
20- |
21- LL | const { &ARR[idx4()] };
22- | ^^^^^^^^^^^^^^^^^^^^^^
23-
2412error: indexing may panic
2513 --> tests/ui/indexing_slicing_index.rs:48:5
2614 |
@@ -63,63 +51,62 @@ LL | const { &ARR[idx4()] };
6351 = note: the suggestion might not be applicable in constant blocks
6452
6553error: index is out of bounds
66- --> tests/ui/indexing_slicing_index.rs:77 :5
54+ --> tests/ui/indexing_slicing_index.rs:76 :5
6755 |
6856LL | y[4];
6957 | ^^^^
7058
7159error: indexing may panic
72- --> tests/ui/indexing_slicing_index.rs:81 :5
60+ --> tests/ui/indexing_slicing_index.rs:80 :5
7361 |
7462LL | v[0];
7563 | ^^^^
7664 |
7765 = help: consider using `.get(n)` or `.get_mut(n)` instead
7866
7967error: indexing may panic
80- --> tests/ui/indexing_slicing_index.rs:83 :5
68+ --> tests/ui/indexing_slicing_index.rs:82 :5
8169 |
8270LL | v[10];
8371 | ^^^^^
8472 |
8573 = help: consider using `.get(n)` or `.get_mut(n)` instead
8674
8775error: indexing may panic
88- --> tests/ui/indexing_slicing_index.rs:85 :5
76+ --> tests/ui/indexing_slicing_index.rs:84 :5
8977 |
9078LL | v[1 << 3];
9179 | ^^^^^^^^^
9280 |
9381 = help: consider using `.get(n)` or `.get_mut(n)` instead
9482
9583error: index is out of bounds
96- --> tests/ui/indexing_slicing_index.rs:93 :5
84+ --> tests/ui/indexing_slicing_index.rs:92 :5
9785 |
9886LL | x[N];
9987 | ^^^^
10088
10189error: indexing may panic
102- --> tests/ui/indexing_slicing_index.rs:97 :5
90+ --> tests/ui/indexing_slicing_index.rs:96 :5
10391 |
10492LL | v[N];
10593 | ^^^^
10694 |
10795 = help: consider using `.get(n)` or `.get_mut(n)` instead
10896
10997error: indexing may panic
110- --> tests/ui/indexing_slicing_index.rs:99 :5
98+ --> tests/ui/indexing_slicing_index.rs:98 :5
11199 |
112100LL | v[M];
113101 | ^^^^
114102 |
115103 = help: consider using `.get(n)` or `.get_mut(n)` instead
116104
117105error: index is out of bounds
118- --> tests/ui/indexing_slicing_index.rs:103 :13
106+ --> tests/ui/indexing_slicing_index.rs:102 :13
119107 |
120108LL | let _ = x[4];
121109 | ^^^^
122110
123- error: aborting due to 15 previous errors
111+ error: aborting due to 14 previous errors
124112
125- For more information about this error, try `rustc --explain E0080`.
0 commit comments