diff --git a/declare_clippy_lint/src/lib.rs b/declare_clippy_lint/src/lib.rs index f7d9c64bfbd0..5052dff22829 100644 --- a/declare_clippy_lint/src/lib.rs +++ b/declare_clippy_lint/src/lib.rs @@ -48,7 +48,8 @@ impl LintListBuilder { pub fn register(self, store: &mut LintStore) { store.register_lints(&self.lints); - store.register_group(true, "clippy::all", Some("clippy_all"), self.all); + store.register_group(true, "clippy::default", Some("clippy_all"), self.all); + store.register_group_alias("clippy::default", "clippy::all"); store.register_group(true, "clippy::cargo", Some("clippy_cargo"), self.cargo); store.register_group(true, "clippy::complexity", Some("clippy_complexity"), self.complexity); store.register_group( diff --git a/tests/ui/clippy_all_group.rs b/tests/ui/clippy_all_group.rs new file mode 100644 index 000000000000..f761420f42f8 --- /dev/null +++ b/tests/ui/clippy_all_group.rs @@ -0,0 +1,11 @@ +// Tests that `clippy::all` still works without a deprecation warning + +//@require-annotations-for-level: WARN + +#![deny(clippy::all)] + +fn f() { + "a".replace("a", "a"); + //~^ no_effect_replace + //~| NOTE: implied by `#[deny(clippy::all)]` +} diff --git a/tests/ui/clippy_all_group.stderr b/tests/ui/clippy_all_group.stderr new file mode 100644 index 000000000000..4ebf1b74c8f4 --- /dev/null +++ b/tests/ui/clippy_all_group.stderr @@ -0,0 +1,15 @@ +error: replacing text with itself + --> tests/ui/clippy_all_group.rs:8:5 + | +LL | "a".replace("a", "a"); + | ^^^^^^^^^^^^^^^^^^^^^ + | +note: the lint level is defined here + --> tests/ui/clippy_all_group.rs:5:9 + | +LL | #![deny(clippy::all)] + | ^^^^^^^^^^^ + = note: `#[deny(clippy::no_effect_replace)]` implied by `#[deny(clippy::all)]` + +error: aborting due to 1 previous error +