@@ -150,7 +150,7 @@ fn check_let_some_else_return_none(cx: &LateContext<'_>, stmt: &Stmt<'_>) {
150150 let init_expr_str = Sugg :: hir_with_applicability ( cx, init_expr, ".." , & mut applicability) . maybe_paren ( ) ;
151151 // Take care when binding is `ref`
152152 let sugg = if let PatKind :: Binding (
153- BindingMode ( ByRef :: Yes ( ref_mutability) , binding_mutability) ,
153+ BindingMode ( ByRef :: Yes ( _ , ref_mutability) , binding_mutability) ,
154154 _hir_id,
155155 ident,
156156 subpattern,
@@ -169,7 +169,7 @@ fn check_let_some_else_return_none(cx: &LateContext<'_>, stmt: &Stmt<'_>) {
169169 // Handle subpattern (@ subpattern)
170170 let maybe_subpattern = match subpattern {
171171 Some ( Pat {
172- kind : PatKind :: Binding ( BindingMode ( ByRef :: Yes ( _ ) , _) , _, subident, None ) ,
172+ kind : PatKind :: Binding ( BindingMode ( ByRef :: Yes ( .. ) , _) , _, subident, None ) ,
173173 ..
174174 } ) => {
175175 // avoid `&ref`
@@ -504,8 +504,8 @@ fn check_if_let_some_or_err_and_early_return<'tcx>(cx: &LateContext<'tcx>, expr:
504504 let receiver_str = snippet_with_applicability ( cx, let_expr. span , ".." , & mut applicability) ;
505505 let requires_semi = matches ! ( cx. tcx. parent_hir_node( expr. hir_id) , Node :: Stmt ( _) ) ;
506506 let method_call_str = match by_ref {
507- ByRef :: Yes ( Mutability :: Mut ) => ".as_mut()" ,
508- ByRef :: Yes ( Mutability :: Not ) => ".as_ref()" ,
507+ ByRef :: Yes ( _ , Mutability :: Mut ) => ".as_mut()" ,
508+ ByRef :: Yes ( _ , Mutability :: Not ) => ".as_ref()" ,
509509 ByRef :: No => "" ,
510510 } ;
511511 let sugg = format ! (
0 commit comments