From 560c8c9c701c0f84cdc725e00562c560b48dd0c2 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 4 Apr 2020 12:58:18 -0700 Subject: [PATCH] Downgrade new_ret_no_self to pedantic --- clippy_lints/src/lib.rs | 3 +-- clippy_lints/src/methods/mod.rs | 2 +- src/lintlist/mod.rs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index dfc2a26b0..f6942f184 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -1106,6 +1106,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: LintId::of(&methods::FILTER_MAP_NEXT), LintId::of(&methods::FIND_MAP), LintId::of(&methods::MAP_FLATTEN), + LintId::of(&methods::NEW_RET_NO_SELF), LintId::of(&methods::OPTION_MAP_UNWRAP_OR), LintId::of(&methods::OPTION_MAP_UNWRAP_OR_ELSE), LintId::of(&methods::RESULT_MAP_UNWRAP_OR_ELSE), @@ -1267,7 +1268,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: LintId::of(&methods::ITER_NTH_ZERO), LintId::of(&methods::ITER_SKIP_NEXT), LintId::of(&methods::MANUAL_SATURATING_ARITHMETIC), - LintId::of(&methods::NEW_RET_NO_SELF), LintId::of(&methods::OK_EXPECT), LintId::of(&methods::OPTION_AND_THEN_SOME), LintId::of(&methods::OPTION_AS_REF_DEREF), @@ -1450,7 +1450,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: LintId::of(&methods::ITER_NTH_ZERO), LintId::of(&methods::ITER_SKIP_NEXT), LintId::of(&methods::MANUAL_SATURATING_ARITHMETIC), - LintId::of(&methods::NEW_RET_NO_SELF), LintId::of(&methods::OK_EXPECT), LintId::of(&methods::OPTION_MAP_OR_NONE), LintId::of(&methods::SHOULD_IMPLEMENT_TRAIT), diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 527508af8..7d7a375dd 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -721,7 +721,7 @@ declare_clippy_lint! { /// } /// ``` pub NEW_RET_NO_SELF, - style, + pedantic, "not returning `Self` in a `new` method" } diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs index 8a6d0af5f..0a565f446 100644 --- a/src/lintlist/mod.rs +++ b/src/lintlist/mod.rs @@ -1447,7 +1447,7 @@ pub static ref ALL_LINTS: Vec = vec![ }, Lint { name: "new_ret_no_self", - group: "style", + group: "pedantic", desc: "not returning `Self` in a `new` method", deprecation: None, module: "methods",