Merge commit 'b52fb5234c' into clippyup

This commit is contained in:
Philipp Krones 2022-09-09 13:36:26 +02:00
parent 854f751b26
commit 98bf99e2f8
689 changed files with 15493 additions and 688 deletions

View file

@ -373,7 +373,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarVisitor<'a, 'tcx> {
},
ExprKind::Closure(&Closure { body, .. }) => {
let body = self.cx.tcx.hir().body(body);
self.visit_expr(&body.value);
self.visit_expr(body.value);
},
_ => walk_expr(self, expr),
}

View file

@ -356,7 +356,7 @@ fn needs_mutable_borrow(cx: &LateContext<'_>, iter_expr: &IterExpr, loop_expr: &
after_loop: false,
used_iter: false,
};
v.visit_expr(&cx.tcx.hir().body(cx.enclosing_body.unwrap()).value);
v.visit_expr(cx.tcx.hir().body(cx.enclosing_body.unwrap()).value);
v.used_iter
}
}