summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-05-20 12:51:28 +0000
committerbors <bors@rust-lang.org>2020-05-20 12:51:28 +0000
commitcafa94662ce3ffc1c8c1edca86e328fcc26ad3db (patch)
treeb5326dbb19148d0e9e9fabfc4656f23225cb0dba /src
parent34ba597ccb92e290c9385d6bc891d06963f974f6 (diff)
parentd90625385e8ed0a9030e3ab2ea0990fce39c28bf (diff)
downloadrust-cafa94662ce3ffc1c8c1edca86e328fcc26ad3db.tar.gz
rust-cafa94662ce3ffc1c8c1edca86e328fcc26ad3db.zip
Auto merge of #5582 - vtmargaryan:match_wildcard_for_single_variants, r=flip1995
New lint: `match_wildcard_for_single_variants`

changelog: Added a new lint match_wildcard_for_single_variants to warn on enum matches where a wildcard is used to match a single variant

Closes #5556
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 9457a64f9c6..0bf46491d31 100644
--- a/src/lintlist/mod.rs
+++ b/src/lintlist/mod.rs
@@ -1201,6 +1201,13 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
         module: "matches",
     },
     Lint {
+        name: "match_wildcard_for_single_variants",
+        group: "pedantic",
+        desc: "a wildcard enum match for a single variant",
+        deprecation: None,
+        module: "matches",
+    },
+    Lint {
         name: "maybe_infinite_iter",
         group: "pedantic",
         desc: "possible infinite iteration",