Downgrade new_ret_no_self to pedantic

This commit is contained in:
David Tolnay 2020-04-04 12:58:18 -07:00
parent 7907abea27
commit 560c8c9c70
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 3 additions and 4 deletions

View File

@ -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),

View File

@ -721,7 +721,7 @@ declare_clippy_lint! {
/// }
/// ```
pub NEW_RET_NO_SELF,
style,
pedantic,
"not returning `Self` in a `new` method"
}

View File

@ -1447,7 +1447,7 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
},
Lint {
name: "new_ret_no_self",
group: "style",
group: "pedantic",
desc: "not returning `Self` in a `new` method",
deprecation: None,
module: "methods",