@@ -682,7 +682,7 @@ fn never_loop_expr(expr: &Expr, main_loop_id: HirId) -> NeverLoopResult {
682
682
} ,
683
683
ExprKind :: Call ( ref e, ref es) => never_loop_expr_all ( & mut once ( & * * e) . chain ( es. iter ( ) ) , main_loop_id) ,
684
684
ExprKind :: Binary ( _, ref e1, ref e2)
685
- | ExprKind :: Assign ( ref e1, ref e2)
685
+ | ExprKind :: Assign ( ref e1, ref e2, _ )
686
686
| ExprKind :: AssignOp ( _, ref e1, ref e2)
687
687
| ExprKind :: Index ( ref e1, ref e2) => never_loop_expr_all ( & mut [ & * * e1, & * * e2] . iter ( ) . cloned ( ) , main_loop_id) ,
688
688
ExprKind :: Loop ( ref b, _, _) => {
@@ -887,7 +887,7 @@ fn get_indexed_assignments<'a, 'tcx>(
887
887
e : & Expr ,
888
888
var : HirId ,
889
889
) -> 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 {
891
891
match (
892
892
get_fixed_offset_var ( cx, lhs, var) ,
893
893
fetch_cloned_fixed_offset_var ( cx, rhs, var) ,
@@ -1861,7 +1861,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarVisitor<'a, 'tcx> {
1861
1861
1862
1862
let old = self . prefer_mutable ;
1863
1863
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, _ ) => {
1865
1865
self . prefer_mutable = true ;
1866
1866
self . visit_expr ( lhs) ;
1867
1867
self . prefer_mutable = false ;
@@ -2083,7 +2083,7 @@ impl<'a, 'tcx> Visitor<'tcx> for IncrementVisitor<'a, 'tcx> {
2083
2083
}
2084
2084
}
2085
2085
} ,
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 ,
2087
2087
ExprKind :: AddrOf ( BorrowKind :: Ref , mutability, _) if mutability == Mutability :: Mut => {
2088
2088
* state = VarState :: DontWarn
2089
2089
} ,
@@ -2161,7 +2161,7 @@ impl<'a, 'tcx> Visitor<'tcx> for InitializeVisitor<'a, 'tcx> {
2161
2161
ExprKind :: AssignOp ( _, ref lhs, _) if lhs. hir_id == expr. hir_id => {
2162
2162
self . state = VarState :: DontWarn ;
2163
2163
} ,
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 => {
2165
2165
self . state = if is_integer_const ( & self . cx , rhs, 0 ) && self . depth == 0 {
2166
2166
VarState :: Warn
2167
2167
} else {
@@ -2303,7 +2303,7 @@ impl<'tcx> Visitor<'tcx> for LoopNestVisitor {
2303
2303
return ;
2304
2304
}
2305
2305
match expr. kind {
2306
- ExprKind :: Assign ( ref path, _) | ExprKind :: AssignOp ( _, ref path, _) => {
2306
+ ExprKind :: Assign ( ref path, _, _ ) | ExprKind :: AssignOp ( _, ref path, _) => {
2307
2307
if match_var ( path, self . iterator ) {
2308
2308
self . nesting = RuledOut ;
2309
2309
}
0 commit comments