@@ -7,8 +7,9 @@ use clippy_utils::sugg::Sugg;
7
7
use clippy_utils:: ty:: { implements_trait, is_type_diagnostic_item, match_type, peel_mid_ty_refs} ;
8
8
use clippy_utils:: visitors:: LocalUsedVisitor ;
9
9
use 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,
12
13
} ;
13
14
use clippy_utils:: { paths, search_same, SpanlessEq , SpanlessHash } ;
14
15
use if_chain:: if_chain;
@@ -578,8 +579,6 @@ impl_lint_pass!(Matches => [
578
579
MATCH_SAME_ARMS ,
579
580
] ) ;
580
581
581
- const MATCH_LIKE_MATCHES_MACRO_MSRV : RustcVersion = RustcVersion :: new ( 1 , 42 , 0 ) ;
582
-
583
582
impl < ' tcx > LateLintPass < ' tcx > for Matches {
584
583
fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' _ > ) {
585
584
if in_external_macro ( cx. sess ( ) , expr. span ) || in_macro ( expr. span ) {
@@ -588,7 +587,7 @@ impl<'tcx> LateLintPass<'tcx> for Matches {
588
587
589
588
redundant_pattern_match:: check ( cx, expr) ;
590
589
591
- if meets_msrv ( self . msrv . as_ref ( ) , & MATCH_LIKE_MATCHES_MACRO_MSRV ) {
590
+ if meets_msrv ( self . msrv . as_ref ( ) , & msrvs :: MATCHES_MACRO ) {
592
591
if !check_match_like_matches ( cx, expr) {
593
592
lint_match_arms ( cx, expr) ;
594
593
}
0 commit comments