Skip to content

Commit d5cf55e

Browse files
authored
fix(diag): Remove complexity, perf, and nursery lint groups (#17307)
### What does this PR try to resolve? These are currently unused and have less chanced of being used in Cargo as compared to Clippy. Pedantic is also unused but only because we removed a lint that used it. It is likely to be used again and having it makes it more likely for people to use it. This was brought up during stabilization. ### How to test and review this PR?
2 parents 223a402 + d59f724 commit d5cf55e

2 files changed

Lines changed: 0 additions & 30 deletions

File tree

doc/book/src/reference/lints.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@
1717
|----------------------|-------------------------------------------------------------------------------------|---------------|
1818
| `cargo::default` | all lints that are on by default (correctness, suspicious, style, complexity, perf) | warn/deny |
1919
| `cargo::correctness` | code that is outright wrong or useless | deny |
20-
| `cargo::complexity` | code that does something simple but in a complex way | warn |
21-
| `cargo::perf` | code that can be written to run faster | warn |
2220
| `cargo::style` | code that should be written in a more idiomatic way | warn |
2321
| `cargo::suspicious` | code that is most likely wrong or useless | warn |
24-
| `cargo::nursery` | new lints that are still under development | allow |
2522
| `cargo::pedantic` | lints which are rather strict or have occasional false positives | allow |
2623
| `cargo::restriction` | lints which prevent the use of Cargo features | allow |
2724

src/diagnostics/rules/mod.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,8 @@ static CARGO_LINTS_MSRV: cargo_util_schemas::manifest::RustVersion =
126126
pub static LINT_GROUPS: &[LintGroup] = &[
127127
DEFAULT,
128128
CORRECTNESS,
129-
COMPLEXITY,
130-
PERF,
131129
STYLE,
132130
SUSPICIOUS,
133-
NURSERY,
134131
PEDANTIC,
135132
RESTRICTION,
136133
TEST_DUMMY_UNSTABLE,
@@ -144,14 +141,6 @@ const DEFAULT: LintGroup = LintGroup {
144141
hidden: false,
145142
};
146143

147-
const COMPLEXITY: LintGroup = LintGroup {
148-
name: "complexity",
149-
desc: "code that does something simple but in a complex way",
150-
default_level: LintLevel::Warn,
151-
feature_gate: None,
152-
hidden: false,
153-
};
154-
155144
const CORRECTNESS: LintGroup = LintGroup {
156145
name: "correctness",
157146
desc: "code that is outright wrong or useless",
@@ -160,14 +149,6 @@ const CORRECTNESS: LintGroup = LintGroup {
160149
hidden: false,
161150
};
162151

163-
const NURSERY: LintGroup = LintGroup {
164-
name: "nursery",
165-
desc: "new lints that are still under development",
166-
default_level: LintLevel::Allow,
167-
feature_gate: None,
168-
hidden: false,
169-
};
170-
171152
const PEDANTIC: LintGroup = LintGroup {
172153
name: "pedantic",
173154
desc: "lints which are rather strict or have occasional false positives",
@@ -176,14 +157,6 @@ const PEDANTIC: LintGroup = LintGroup {
176157
hidden: false,
177158
};
178159

179-
const PERF: LintGroup = LintGroup {
180-
name: "perf",
181-
desc: "code that can be written to run faster",
182-
default_level: LintLevel::Warn,
183-
feature_gate: None,
184-
hidden: false,
185-
};
186-
187160
const RESTRICTION: LintGroup = LintGroup {
188161
name: "restriction",
189162
desc: "lints which prevent the use of Cargo features",

0 commit comments

Comments
 (0)