about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2020-08-10 14:56:25 +0200
committerGitHub <noreply@github.com>2020-08-10 14:56:25 +0200
commit9da5b6d1d055ae22a297be0aa33ea2e1e8c79295 (patch)
tree937ff66e8597bd0b49aaaf1422f8cc825b8aaebf /src
parent72283689534272fb64952a3d7161de72513de6cf (diff)
parent610d4e3c8b1bfa27e059043554f4156fe1254142 (diff)
downloadrust-9da5b6d1d055ae22a297be0aa33ea2e1e8c79295.tar.gz
rust-9da5b6d1d055ae22a297be0aa33ea2e1e8c79295.zip
Rollup merge of #5825 - giraffate:same_item_push, r=Manishearth
Add the new lint `same_item_push`

changelog: Add the new lint `same_item_push`

Fixed #4078. As I said in https://github.com/rust-lang/rust-clippy/issues/4078#issuecomment-658184195, I referrerd to https://github.com/rust-lang/rust-clippy/pull/4647.
Diffstat (limited to 'src')
-rw-r--r--src/lintlist/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs
index b64c6e54409..6547848ba9e 100644
--- a/src/lintlist/mod.rs
+++ b/src/lintlist/mod.rs
@@ -1936,6 +1936,13 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
         module: "copies",
     },
     Lint {
+        name: "same_item_push",
+        group: "style",
+        desc: "the same item is pushed inside of a for loop",
+        deprecation: None,
+        module: "loops",
+    },
+    Lint {
         name: "search_is_some",
         group: "complexity",
         desc: "using an iterator search followed by `is_some()`, which is more succinctly expressed as a call to `any()`",