Skip to content

Commit 0a70aea

Browse files
committed
Soft rename clippy::all to clippy::default
1 parent 34f81f9 commit 0a70aea

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

clippy_lints/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ struct RegistrationGroups {
429429
impl RegistrationGroups {
430430
#[rustfmt::skip]
431431
fn register(self, store: &mut rustc_lint::LintStore) {
432-
store.register_group(true, "clippy::all", Some("clippy_all"), self.all);
432+
store.register_group(true, "clippy::default", Some("clippy_all"), self.all);
433+
store.register_group_alias("clippy::default", "clippy::all");
433434
store.register_group(true, "clippy::cargo", Some("clippy_cargo"), self.cargo);
434435
store.register_group(true, "clippy::complexity", Some("clippy_complexity"), self.complexity);
435436
store.register_group(true, "clippy::correctness", Some("clippy_correctness"), self.correctness);

tests/ui/clippy_all_group.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Tests that `clippy::all` still works without a deprecation warning
2+
3+
//@require-annotations-for-level: WARN
4+
5+
#![deny(clippy::all)]
6+
7+
fn f() {
8+
"a".replace("a", "a");
9+
//~^ no_effect_replace
10+
//~| NOTE: implied by `#[deny(clippy::all)]`
11+
}

tests/ui/clippy_all_group.stderr

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error: replacing text with itself
2+
--> tests/ui/clippy_all_group.rs:8:5
3+
|
4+
LL | "a".replace("a", "a");
5+
| ^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: the lint level is defined here
8+
--> tests/ui/clippy_all_group.rs:5:9
9+
|
10+
LL | #![deny(clippy::all)]
11+
| ^^^^^^^^^^^
12+
= note: `#[deny(clippy::no_effect_replace)]` implied by `#[deny(clippy::all)]`
13+
14+
error: aborting due to 1 previous error
15+

0 commit comments

Comments
 (0)