@@ -674,7 +674,7 @@ fn never_loop_expr(expr: &Expr, main_loop_id: HirId) -> NeverLoopResult {
674674 | ExprKind :: Cast ( ref e, _)
675675 | ExprKind :: Type ( ref e, _)
676676 | ExprKind :: Field ( ref e, _)
677- | ExprKind :: AddrOf ( _, ref e)
677+ | ExprKind :: AddrOf ( _, _ , ref e)
678678 | ExprKind :: Struct ( _, _, Some ( ref e) )
679679 | ExprKind :: Repeat ( ref e, _)
680680 | ExprKind :: DropTemps ( ref e) => never_loop_expr ( e, main_loop_id) ,
@@ -1504,7 +1504,7 @@ fn make_iterator_snippet(cx: &LateContext<'_, '_>, arg: &Expr, applic_ref: &mut
15041504 // (&x).into_iter() ==> x.iter()
15051505 // (&mut x).into_iter() ==> x.iter_mut()
15061506 match & arg. kind {
1507- ExprKind :: AddrOf ( mutability, arg_inner) if has_iter_method ( cx, cx. tables . expr_ty ( & arg_inner) ) . is_some ( ) => {
1507+ ExprKind :: AddrOf ( _ , mutability, arg_inner) if has_iter_method ( cx, cx. tables . expr_ty ( & arg_inner) ) . is_some ( ) => {
15081508 let meth_name = match mutability {
15091509 Mutability :: Mutable => "iter_mut" ,
15101510 Mutability :: Immutable => "iter" ,
@@ -1549,7 +1549,7 @@ fn check_for_loop_over_map_kv<'a, 'tcx>(
15491549 Mutability :: Mutable => "_mut" ,
15501550 } ;
15511551 let arg = match arg. kind {
1552- ExprKind :: AddrOf ( _, ref expr) => & * * expr,
1552+ ExprKind :: AddrOf ( _, _ , ref expr) => & * * expr,
15531553 _ => arg,
15541554 } ;
15551555
@@ -1873,7 +1873,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarVisitor<'a, 'tcx> {
18731873 self . prefer_mutable = false ;
18741874 self . visit_expr ( rhs) ;
18751875 } ,
1876- ExprKind :: AddrOf ( mutbl, ref expr) => {
1876+ ExprKind :: AddrOf ( _ , mutbl, ref expr) => {
18771877 if mutbl == Mutability :: Mutable {
18781878 self . prefer_mutable = true ;
18791879 }
@@ -2090,7 +2090,7 @@ impl<'a, 'tcx> Visitor<'tcx> for IncrementVisitor<'a, 'tcx> {
20902090 }
20912091 } ,
20922092 ExprKind :: Assign ( ref lhs, _) if lhs. hir_id == expr. hir_id => * state = VarState :: DontWarn ,
2093- ExprKind :: AddrOf ( mutability, _) if mutability == Mutability :: Mutable => * state = VarState :: DontWarn ,
2093+ ExprKind :: AddrOf ( _ , mutability, _) if mutability == Mutability :: Mutable => * state = VarState :: DontWarn ,
20942094 _ => ( ) ,
20952095 }
20962096 }
@@ -2172,7 +2172,7 @@ impl<'a, 'tcx> Visitor<'tcx> for InitializeVisitor<'a, 'tcx> {
21722172 VarState :: DontWarn
21732173 }
21742174 } ,
2175- ExprKind :: AddrOf ( mutability, _) if mutability == Mutability :: Mutable => {
2175+ ExprKind :: AddrOf ( _ , mutability, _) if mutability == Mutability :: Mutable => {
21762176 self . state = VarState :: DontWarn
21772177 } ,
21782178 _ => ( ) ,
0 commit comments