@@ -238,7 +238,7 @@ declare_clippy_lint! {
238238 /// "bar" | _ => {},
239239 /// }
240240 /// ```
241- pub PATS_WITH_WILD_MATCH_ARM ,
241+ pub WILDCARD_IN_OR_PATTERNS ,
242242 complexity,
243243 "a wildcard pattern used with others patterns in same match arm"
244244}
@@ -252,7 +252,7 @@ declare_lint_pass!(Matches => [
252252 MATCH_WILD_ERR_ARM ,
253253 MATCH_AS_REF ,
254254 WILDCARD_ENUM_MATCH_ARM ,
255- PATS_WITH_WILD_MATCH_ARM
255+ WILDCARD_IN_OR_PATTERNS
256256] ) ;
257257
258258impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for Matches {
@@ -267,7 +267,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Matches {
267267 check_wild_err_arm ( cx, ex, arms) ;
268268 check_wild_enum_match ( cx, ex, arms) ;
269269 check_match_as_ref ( cx, ex, arms, expr) ;
270- check_pats_wild_match ( cx, ex, arms) ;
270+ check_wild_in_or_pats ( cx, ex, arms) ;
271271 }
272272 if let ExprKind :: Match ( ref ex, ref arms, _) = expr. kind {
273273 check_match_ref_pats ( cx, ex, arms, expr) ;
@@ -686,7 +686,7 @@ fn check_match_as_ref(cx: &LateContext<'_, '_>, ex: &Expr<'_>, arms: &[Arm<'_>],
686686 }
687687}
688688
689- fn check_pats_wild_match ( cx : & LateContext < ' _ , ' _ > , ex : & Expr < ' _ > , arms : & [ Arm < ' _ > ] ) {
689+ fn check_wild_in_or_pats ( cx : & LateContext < ' _ , ' _ > , ex : & Expr < ' _ > , arms : & [ Arm < ' _ > ] ) {
690690 let mut is_non_exhaustive_enum = false ;
691691 let ty = cx. tables . expr_ty ( ex) ;
692692 if ty. is_enum ( ) {
@@ -703,7 +703,7 @@ fn check_pats_wild_match(cx: &LateContext<'_, '_>, ex: &Expr<'_>, arms: &[Arm<'_
703703 if fields. len ( ) > 1 && fields. iter ( ) . any ( is_wild) {
704704 span_lint_and_then (
705705 cx,
706- PATS_WITH_WILD_MATCH_ARM ,
706+ WILDCARD_IN_OR_PATTERNS ,
707707 arm. pat . span ,
708708 "wildcard pattern covers any other pattern as it will match anyway." ,
709709 |db| {
0 commit comments