@@ -7,8 +7,9 @@ use clippy_utils::sugg::Sugg;
77use clippy_utils:: ty:: { implements_trait, is_type_diagnostic_item, match_type, peel_mid_ty_refs} ;
88use clippy_utils:: visitors:: LocalUsedVisitor ;
99use clippy_utils:: {
10- get_parent_expr, in_macro, is_allowed, is_expn_of, is_lang_ctor, is_refutable, is_wild, meets_msrv, path_to_local,
11- path_to_local_id, peel_hir_pat_refs, peel_n_hir_expr_refs, recurse_or_patterns, remove_blocks, strip_pat_refs,
10+ get_parent_expr, in_macro, is_allowed, is_expn_of, is_lang_ctor, is_refutable, is_wild, meets_msrv, msrvs,
11+ path_to_local, path_to_local_id, peel_hir_pat_refs, peel_n_hir_expr_refs, recurse_or_patterns, remove_blocks,
12+ strip_pat_refs,
1213} ;
1314use clippy_utils:: { paths, search_same, SpanlessEq , SpanlessHash } ;
1415use if_chain:: if_chain;
@@ -578,8 +579,6 @@ impl_lint_pass!(Matches => [
578579 MATCH_SAME_ARMS ,
579580] ) ;
580581
581- const MATCH_LIKE_MATCHES_MACRO_MSRV : RustcVersion = RustcVersion :: new ( 1 , 42 , 0 ) ;
582-
583582impl < ' tcx > LateLintPass < ' tcx > for Matches {
584583 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' _ > ) {
585584 if in_external_macro ( cx. sess ( ) , expr. span ) || in_macro ( expr. span ) {
@@ -588,7 +587,7 @@ impl<'tcx> LateLintPass<'tcx> for Matches {
588587
589588 redundant_pattern_match:: check ( cx, expr) ;
590589
591- if meets_msrv ( self . msrv . as_ref ( ) , & MATCH_LIKE_MATCHES_MACRO_MSRV ) {
590+ if meets_msrv ( self . msrv . as_ref ( ) , & msrvs :: MATCHES_MACRO ) {
592591 if !check_match_like_matches ( cx, expr) {
593592 lint_match_arms ( cx, expr) ;
594593 }
0 commit comments