From 70a2a294530464dd142c5e9a0a7142dc23969cad Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Fri, 29 Nov 2019 07:51:49 +0100 Subject: [PATCH 1/2] Move use_self to nursery Closes #4859 We have a lot of false positives in this lint, so I think it makes sense to move this to the nursery until they are resolved. changelog: Move `use_self` lint to nursery, due to many false positives --- clippy_lints/src/use_self.rs | 2 +- src/lintlist/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/use_self.rs b/clippy_lints/src/use_self.rs index 5a048e1ce43b..23d0ab090201 100644 --- a/clippy_lints/src/use_self.rs +++ b/clippy_lints/src/use_self.rs @@ -43,7 +43,7 @@ declare_clippy_lint! { /// } /// ``` pub USE_SELF, - pedantic, + nursery, "Unnecessary structure name repetition whereas `Self` is applicable" } diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs index e5d8f2d0c1a8..5b08571c2588 100644 --- a/src/lintlist/mod.rs +++ b/src/lintlist/mod.rs @@ -2193,7 +2193,7 @@ pub const ALL_LINTS: [Lint; 338] = [ }, Lint { name: "use_self", - group: "pedantic", + group: "nursery", desc: "Unnecessary structure name repetition whereas `Self` is applicable", deprecation: None, module: "use_self", From fd7eca2baf456c2e86b16096a65e20b728861e4d Mon Sep 17 00:00:00 2001 From: flip1995 Date: Fri, 29 Nov 2019 14:50:19 +0100 Subject: [PATCH 2/2] Run update_lints --- clippy_lints/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index bdccbde9a180..07fe9f474653 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -1050,7 +1050,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf LintId::of(&unicode::NON_ASCII_LITERAL), LintId::of(&unicode::UNICODE_NOT_NFC), LintId::of(&unused_self::UNUSED_SELF), - LintId::of(&use_self::USE_SELF), ]); store.register_group(true, "clippy::internal", Some("clippy_internal"), vec![ @@ -1579,6 +1578,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf LintId::of(&mutex_atomic::MUTEX_INTEGER), LintId::of(&needless_borrow::NEEDLESS_BORROW), LintId::of(&path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE), + LintId::of(&use_self::USE_SELF), ]); }