Skip to content

Commit 2299304

Browse files
committed
Make it a renamed lint instead
1 parent 3171456 commit 2299304

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

clippy_lints/src/deprecated_lints.rs

-10
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,3 @@ declare_deprecated_lint! {
123123
pub UNSAFE_VECTOR_INITIALIZATION,
124124
"the replacement suggested by this lint had substantially different behavior"
125125
}
126-
127-
128-
/// **What it does:** Nothing, this lint has been deprecated.
129-
///
130-
/// **Deprecation reason:** This lint was merged with new_without_default
131-
declare_deprecated_lint! {
132-
pub NEW_WITHOUT_DEFAULT_DERIVE,
133-
style,
134-
"`fn new() -> Self` without `#[derive]`able `Default` implementation"
135-
}

clippy_lints/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
10301030

10311031
pub fn register_renamed(ls: &mut rustc::lint::LintStore) {
10321032
ls.register_renamed("clippy::stutter", "clippy::module_name_repetitions");
1033+
ls.register_renamed("clippy::new_without_default_derive", "clippy::new_without_default");
10331034
}
10341035

10351036
// only exists to let the dogfood integration test works.

tests/ui/rename.rs

+7
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@
1111

1212
#[warn(clippy::stutter)]
1313
fn main() {}
14+
15+
#[warn(clippy::new_without_default_derive)]
16+
struct Foo;
17+
18+
impl Foo {
19+
fn new() -> Self { Foo }
20+
}

0 commit comments

Comments
 (0)