Skip to content

Commit 6d7c16a

Browse files
authored
Remove ClippyCtfe pass (#14712)
It doesn't seem to be load bearing for any clippy lints and the rustc ones that no longer appear behave the same as they would for a `cargo check` r? @blyxyas changelog: none
2 parents 9e7782b + d49b8aa commit 6d7c16a

File tree

6 files changed

+12
-85
lines changed

6 files changed

+12
-85
lines changed

clippy_lints/src/ctfe.rs

Lines changed: 0 additions & 26 deletions
This file was deleted.

clippy_lints/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ extern crate clippy_utils;
6666

6767
mod utils;
6868

69-
pub mod ctfe; // Very important lint, do not remove (rust#125116)
7069
pub mod declared_lints;
7170
pub mod deprecated_lints;
7271

@@ -586,8 +585,6 @@ pub fn register_lints(store: &mut rustc_lint::LintStore, conf: &'static Conf) {
586585
let attrs = attr_storage.clone();
587586
store.register_early_pass(move || Box::new(AttrCollector::new(attrs.clone())));
588587

589-
store.register_late_pass(|_| Box::new(ctfe::ClippyCtfe));
590-
591588
store.register_late_pass(move |_| Box::new(operators::arithmetic_side_effects::ArithmeticSideEffects::new(conf)));
592589
store.register_late_pass(|_| Box::new(utils::dump_hir::DumpHir));
593590
store.register_late_pass(|_| Box::new(utils::author::Author));

tests/ui/crashes/ice-9463.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
#![deny(arithmetic_overflow)]
1+
//@check-pass
2+
23
fn main() {
34
let _x = -1_i32 >> -1;
4-
//~^ ERROR: this arithmetic operation will overflow
5+
#[expect(overflowing_literals)]
56
let _y = 1u32 >> 10000000000000u32;
6-
//~^ ERROR: this arithmetic operation will overflow
7-
//~| ERROR: literal out of range
87
}

tests/ui/crashes/ice-9463.stderr

Lines changed: 0 additions & 29 deletions
This file was deleted.

tests/ui/indexing_slicing_index.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ fn main() {
6868
// This should be linted, since `suppress-restriction-lint-in-const` default is false.
6969
const { &ARR[idx4()] };
7070
//~^ ERROR: indexing may panic
71-
//~| ERROR: evaluation of `main
7271

7372
let y = &x;
7473
// Ok, referencing shouldn't affect this lint. See the issue 6021

tests/ui/indexing_slicing_index.stderr

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
2412
error: 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

6553
error: index is out of bounds
66-
--> tests/ui/indexing_slicing_index.rs:77:5
54+
--> tests/ui/indexing_slicing_index.rs:76:5
6755
|
6856
LL | y[4];
6957
| ^^^^
7058

7159
error: indexing may panic
72-
--> tests/ui/indexing_slicing_index.rs:81:5
60+
--> tests/ui/indexing_slicing_index.rs:80:5
7361
|
7462
LL | v[0];
7563
| ^^^^
7664
|
7765
= help: consider using `.get(n)` or `.get_mut(n)` instead
7866

7967
error: indexing may panic
80-
--> tests/ui/indexing_slicing_index.rs:83:5
68+
--> tests/ui/indexing_slicing_index.rs:82:5
8169
|
8270
LL | v[10];
8371
| ^^^^^
8472
|
8573
= help: consider using `.get(n)` or `.get_mut(n)` instead
8674

8775
error: indexing may panic
88-
--> tests/ui/indexing_slicing_index.rs:85:5
76+
--> tests/ui/indexing_slicing_index.rs:84:5
8977
|
9078
LL | v[1 << 3];
9179
| ^^^^^^^^^
9280
|
9381
= help: consider using `.get(n)` or `.get_mut(n)` instead
9482

9583
error: index is out of bounds
96-
--> tests/ui/indexing_slicing_index.rs:93:5
84+
--> tests/ui/indexing_slicing_index.rs:92:5
9785
|
9886
LL | x[N];
9987
| ^^^^
10088

10189
error: indexing may panic
102-
--> tests/ui/indexing_slicing_index.rs:97:5
90+
--> tests/ui/indexing_slicing_index.rs:96:5
10391
|
10492
LL | v[N];
10593
| ^^^^
10694
|
10795
= help: consider using `.get(n)` or `.get_mut(n)` instead
10896

10997
error: indexing may panic
110-
--> tests/ui/indexing_slicing_index.rs:99:5
98+
--> tests/ui/indexing_slicing_index.rs:98:5
11199
|
112100
LL | v[M];
113101
| ^^^^
114102
|
115103
= help: consider using `.get(n)` or `.get_mut(n)` instead
116104

117105
error: index is out of bounds
118-
--> tests/ui/indexing_slicing_index.rs:103:13
106+
--> tests/ui/indexing_slicing_index.rs:102:13
119107
|
120108
LL | 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

Comments
 (0)