From c6ef9d292b0311751cf5b5ede1eba0374132c7d4 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Thu, 14 Nov 2019 08:15:04 +0300 Subject: [PATCH] Run ./util/dev --- CHANGELOG.md | 1 + clippy_lints/src/lib.rs | 1 - src/lintlist/mod.rs | 9 ++++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1b8cbcde86f..383cac26016d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1033,6 +1033,7 @@ Released 2018-09-13 [`if_not_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else [`if_same_then_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [`ifs_same_cond`]: https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond +[`ifs_same_cond_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond_fn [`implicit_hasher`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher [`implicit_return`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return [`inconsistent_digit_grouping`]: https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 50b550e46b7a..c390233e2bce 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -1069,7 +1069,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf LintId::of(&collapsible_if::COLLAPSIBLE_IF), LintId::of(&comparison_chain::COMPARISON_CHAIN), LintId::of(&copies::IFS_SAME_COND), - LintId::of(&copies::IFS_SAME_COND_FN), LintId::of(&copies::IF_SAME_THEN_ELSE), LintId::of(&derive::DERIVE_HASH_XOR_EQ), LintId::of(&doc::MISSING_SAFETY_DOC), diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs index 0b301b6be963..b033da45ecb5 100644 --- a/src/lintlist/mod.rs +++ b/src/lintlist/mod.rs @@ -6,7 +6,7 @@ pub use lint::Lint; pub use lint::LINT_LEVELS; // begin lint list, do not remove this comment, it’s used in `update_lints` -pub const ALL_LINTS: [Lint; 333] = [ +pub const ALL_LINTS: [Lint; 334] = [ Lint { name: "absurd_extreme_comparisons", group: "correctness", @@ -714,6 +714,13 @@ pub const ALL_LINTS: [Lint; 333] = [ deprecation: None, module: "copies", }, + Lint { + name: "ifs_same_cond_fn", + group: "pedantic", + desc: "consecutive `ifs` with the same function call", + deprecation: None, + module: "copies", + }, Lint { name: "implicit_hasher", group: "style",