@@ -682,7 +682,7 @@ fn never_loop_expr(expr: &Expr, main_loop_id: HirId) -> NeverLoopResult {
682682 } ,
683683 ExprKind :: Call ( ref e, ref es) => never_loop_expr_all ( & mut once ( & * * e) . chain ( es. iter ( ) ) , main_loop_id) ,
684684 ExprKind :: Binary ( _, ref e1, ref e2)
685- | ExprKind :: Assign ( ref e1, ref e2)
685+ | ExprKind :: Assign ( ref e1, ref e2, _ )
686686 | ExprKind :: AssignOp ( _, ref e1, ref e2)
687687 | ExprKind :: Index ( ref e1, ref e2) => never_loop_expr_all ( & mut [ & * * e1, & * * e2] . iter ( ) . cloned ( ) , main_loop_id) ,
688688 ExprKind :: Loop ( ref b, _, _) => {
@@ -887,7 +887,7 @@ fn get_indexed_assignments<'a, 'tcx>(
887887 e : & Expr ,
888888 var : HirId ,
889889 ) -> Option < ( FixedOffsetVar , FixedOffsetVar ) > {
890- if let ExprKind :: Assign ( ref lhs, ref rhs) = e. kind {
890+ if let ExprKind :: Assign ( ref lhs, ref rhs, _ ) = e. kind {
891891 match (
892892 get_fixed_offset_var ( cx, lhs, var) ,
893893 fetch_cloned_fixed_offset_var ( cx, rhs, var) ,
@@ -1861,7 +1861,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarVisitor<'a, 'tcx> {
18611861
18621862 let old = self . prefer_mutable ;
18631863 match expr. kind {
1864- ExprKind :: AssignOp ( _, ref lhs, ref rhs) | ExprKind :: Assign ( ref lhs, ref rhs) => {
1864+ ExprKind :: AssignOp ( _, ref lhs, ref rhs) | ExprKind :: Assign ( ref lhs, ref rhs, _ ) => {
18651865 self . prefer_mutable = true ;
18661866 self . visit_expr ( lhs) ;
18671867 self . prefer_mutable = false ;
@@ -2083,7 +2083,7 @@ impl<'a, 'tcx> Visitor<'tcx> for IncrementVisitor<'a, 'tcx> {
20832083 }
20842084 }
20852085 } ,
2086- ExprKind :: Assign ( ref lhs, _) if lhs. hir_id == expr. hir_id => * state = VarState :: DontWarn ,
2086+ ExprKind :: Assign ( ref lhs, _, _ ) if lhs. hir_id == expr. hir_id => * state = VarState :: DontWarn ,
20872087 ExprKind :: AddrOf ( BorrowKind :: Ref , mutability, _) if mutability == Mutability :: Mut => {
20882088 * state = VarState :: DontWarn
20892089 } ,
@@ -2161,7 +2161,7 @@ impl<'a, 'tcx> Visitor<'tcx> for InitializeVisitor<'a, 'tcx> {
21612161 ExprKind :: AssignOp ( _, ref lhs, _) if lhs. hir_id == expr. hir_id => {
21622162 self . state = VarState :: DontWarn ;
21632163 } ,
2164- ExprKind :: Assign ( ref lhs, ref rhs) if lhs. hir_id == expr. hir_id => {
2164+ ExprKind :: Assign ( ref lhs, ref rhs, _ ) if lhs. hir_id == expr. hir_id => {
21652165 self . state = if is_integer_const ( & self . cx , rhs, 0 ) && self . depth == 0 {
21662166 VarState :: Warn
21672167 } else {
@@ -2303,7 +2303,7 @@ impl<'tcx> Visitor<'tcx> for LoopNestVisitor {
23032303 return ;
23042304 }
23052305 match expr. kind {
2306- ExprKind :: Assign ( ref path, _) | ExprKind :: AssignOp ( _, ref path, _) => {
2306+ ExprKind :: Assign ( ref path, _, _ ) | ExprKind :: AssignOp ( _, ref path, _) => {
23072307 if match_var ( path, self . iterator ) {
23082308 self . nesting = RuledOut ;
23092309 }
0 commit comments