Skip to content

Commit dc0408e

Browse files
committed
Update clippy ui test.
The reason we do not trigger these lints anymore is that clippy sets the mir-opt-level to 0, and the recent changes subtly changed how the const propagator works.
1 parent 8d5f2bd commit dc0408e

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/tools/clippy/tests/ui/indexing_slicing_index.stderr

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
error: this operation will panic at runtime
2-
--> $DIR/indexing_slicing_index.rs:11:5
3-
|
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
6-
|
7-
= note: `#[deny(unconditional_panic)]` on by default
8-
9-
error: this operation will panic at runtime
10-
--> $DIR/indexing_slicing_index.rs:12:5
11-
|
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
14-
15-
error: this operation will panic at runtime
16-
--> $DIR/indexing_slicing_index.rs:27:5
17-
|
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
20-
211
error: indexing may panic.
222
--> $DIR/indexing_slicing_index.rs:10:5
233
|
@@ -75,5 +55,5 @@ LL | v[M];
7555
|
7656
= help: Consider using `.get(n)` or `.get_mut(n)` instead
7757

78-
error: aborting due to 10 previous errors
58+
error: aborting due to 7 previous errors
7959

0 commit comments

Comments
 (0)