]> git.lizzy.rs Git - rust.git/commitdiff
Change match_wild lint name to WILDCARD_MATCH_ARM.
authorAlex Hamilton <alex.hamilton@ou.edu>
Sat, 12 Jan 2019 23:45:16 +0000 (17:45 -0600)
committerAlex Hamilton <alex.hamilton@ou.edu>
Tue, 29 Jan 2019 21:33:04 +0000 (15:33 -0600)
Also fix message capitalization.

clippy_lints/src/matches.rs

index 4be045175bb2ec7063ef8cb711b2aa9af4c538b2..bdade6ee19e7fe6051c8031d3cb35bbf7c73317d 100644 (file)
 /// }
 /// ```
 declare_clippy_lint! {
-    pub MATCH_WILD,
+    pub WILDCARD_MATCH_ARM,
     restriction,
     "a wildcard match arm using `_`"
 }
@@ -219,7 +219,7 @@ fn get_lints(&self) -> LintArray {
             MATCH_OVERLAPPING_ARM,
             MATCH_WILD_ERR_ARM,
             MATCH_AS_REF,
-            MATCH_WILD
+            WILDCARD_MATCH_ARM
         )
     }
 
@@ -469,9 +469,9 @@ fn check_wild_arm(cx: &LateContext<'_, '_>, ex: &Expr, arms: &[Arm]) {
         for arm in arms {
             if is_wild(&arm.pats[0]) {
                 span_note_and_lint(cx,
-                    MATCH_WILD,
+                    WILDCARD_MATCH_ARM,
                     arm.pats[0].span,
-                    "Wildcard match will miss any future added variants.",
+                    "wildcard match will miss any future added variants.",
                     arm.pats[0].span,
                     "to resolve, match each variant explicitly");
             }