From 11ab30cfd6194cf133e16010199c6d00f318d2ac Mon Sep 17 00:00:00 2001 From: Nipunn Koorapati Date: Wed, 19 Feb 2020 15:32:59 -0800 Subject: [PATCH] Move unneeded_field_pattern to pedantic group Fixes https://github.com/rust-lang/rust-clippy/issues/1741 --- CHANGELOG.md | 2 ++ clippy_lints/src/lib.rs | 3 +-- clippy_lints/src/misc_early.rs | 2 +- src/lintlist/mod.rs | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f527a407db7..a5edc98436d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ document. [69f99e7...master](https://github.com/rust-lang/rust-clippy/compare/69f99e7...master) +* Move `unneeded_field_pattern` to pedantic group [#1741](https://github.com/rust-lang/rust-clippy/issues/1741) + ## Rust 1.42 Current Beta diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 8bd0d187061a..3360f452324f 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -1082,6 +1082,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: LintId::of(&methods::OPTION_MAP_UNWRAP_OR_ELSE), LintId::of(&methods::RESULT_MAP_UNWRAP_OR_ELSE), LintId::of(&misc::USED_UNDERSCORE_BINDING), + LintId::of(&misc_early::UNNEEDED_FIELD_PATTERN), LintId::of(&misc_early::UNSEPARATED_LITERAL_SUFFIX), LintId::of(&mut_mut::MUT_MUT), LintId::of(&needless_continue::NEEDLESS_CONTINUE), @@ -1270,7 +1271,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: LintId::of(&misc_early::MIXED_CASE_HEX_LITERALS), LintId::of(&misc_early::REDUNDANT_CLOSURE_CALL), LintId::of(&misc_early::REDUNDANT_PATTERN), - LintId::of(&misc_early::UNNEEDED_FIELD_PATTERN), LintId::of(&misc_early::UNNEEDED_WILDCARD_PATTERN), LintId::of(&misc_early::ZERO_PREFIXED_LITERAL), LintId::of(&mut_key::MUTABLE_KEY_TYPE), @@ -1433,7 +1433,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: LintId::of(&misc_early::DUPLICATE_UNDERSCORE_ARGUMENT), LintId::of(&misc_early::MIXED_CASE_HEX_LITERALS), LintId::of(&misc_early::REDUNDANT_PATTERN), - LintId::of(&misc_early::UNNEEDED_FIELD_PATTERN), LintId::of(&mut_reference::UNNECESSARY_MUT_PASSED), LintId::of(&neg_multiply::NEG_MULTIPLY), LintId::of(&new_without_default::NEW_WITHOUT_DEFAULT), diff --git a/clippy_lints/src/misc_early.rs b/clippy_lints/src/misc_early.rs index b28a61eb6219..d40628aad580 100644 --- a/clippy_lints/src/misc_early.rs +++ b/clippy_lints/src/misc_early.rs @@ -25,7 +25,7 @@ declare_clippy_lint! { /// let { a: _, b: ref b, c: _ } = .. /// ``` pub UNNEEDED_FIELD_PATTERN, - style, + pedantic, "struct fields bound to a wildcard instead of using `..`" } diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs index 8c04afce1d27..f4c76f71133b 100644 --- a/src/lintlist/mod.rs +++ b/src/lintlist/mod.rs @@ -2228,7 +2228,7 @@ pub const ALL_LINTS: [Lint; 355] = [ }, Lint { name: "unneeded_field_pattern", - group: "style", + group: "pedantic", desc: "struct fields bound to a wildcard instead of using `..`", deprecation: None, module: "misc_early",