@@ -631,7 +631,7 @@ impl<'tcx> LateLintPass<'tcx> for Matches {
631
631
check_match_single_binding ( cx, ex, arms, expr) ;
632
632
}
633
633
}
634
- if let ExprKind :: Match ( ref ex, ref arms, _) = expr. kind {
634
+ if let ExprKind :: Match ( ex, arms, _) = expr. kind {
635
635
check_match_ref_pats ( cx, ex, arms. iter ( ) . map ( |el| el. pat ) , expr) ;
636
636
}
637
637
if let Some ( higher:: IfLet { let_pat, let_expr, .. } ) = higher:: IfLet :: hir ( cx, expr) {
@@ -1194,7 +1194,7 @@ where
1194
1194
1195
1195
let ( first_sugg, msg, title) ;
1196
1196
let span = ex. span . source_callsite ( ) ;
1197
- if let ExprKind :: AddrOf ( BorrowKind :: Ref , Mutability :: Not , ref inner) = ex. kind {
1197
+ if let ExprKind :: AddrOf ( BorrowKind :: Ref , Mutability :: Not , inner) = ex. kind {
1198
1198
first_sugg = once ( ( span, Sugg :: hir_with_macro_callsite ( cx, inner, ".." ) . to_string ( ) ) ) ;
1199
1199
msg = "try" ;
1200
1200
title = "you don't need to add `&` to both the expression and the patterns" ;
@@ -1205,7 +1205,7 @@ where
1205
1205
}
1206
1206
1207
1207
let remaining_suggs = pats. filter_map ( |pat| {
1208
- if let PatKind :: Ref ( ref refp, _) = pat. kind {
1208
+ if let PatKind :: Ref ( refp, _) = pat. kind {
1209
1209
Some ( ( pat. span , snippet ( cx, refp. span , ".." ) . to_string ( ) ) )
1210
1210
} else {
1211
1211
None
@@ -1365,7 +1365,7 @@ where
1365
1365
find_bool_lit( & arm. 2 . kind, is_if_let) . map_or( false , |b| b == b0) && arm. 3 . is_none( ) && arm. 0 . is_empty( )
1366
1366
} ) ;
1367
1367
then {
1368
- if let Some ( ref last_pat) = last_pat_opt {
1368
+ if let Some ( last_pat) = last_pat_opt {
1369
1369
if !is_wild( last_pat) {
1370
1370
return false ;
1371
1371
}
@@ -1827,13 +1827,13 @@ mod redundant_pattern_match {
1827
1827
..
1828
1828
} ) = higher:: IfLet :: hir ( cx, expr)
1829
1829
{
1830
- find_sugg_for_if_let ( cx, expr, let_pat, let_expr, "if" , if_else. is_some ( ) )
1830
+ find_sugg_for_if_let ( cx, expr, let_pat, let_expr, "if" , if_else. is_some ( ) ) ;
1831
1831
}
1832
1832
if let ExprKind :: Match ( op, arms, MatchSource :: Normal ) = & expr. kind {
1833
- find_sugg_for_match ( cx, expr, op, arms)
1833
+ find_sugg_for_match ( cx, expr, op, arms) ;
1834
1834
}
1835
1835
if let Some ( higher:: WhileLet { let_pat, let_expr, .. } ) = higher:: WhileLet :: hir ( expr) {
1836
- find_sugg_for_if_let ( cx, expr, let_pat, let_expr, "while" , false )
1836
+ find_sugg_for_if_let ( cx, expr, let_pat, let_expr, "while" , false ) ;
1837
1837
}
1838
1838
}
1839
1839
0 commit comments