if let Some(e) = e {
self.visit_expr(e);
}
- } else if let ExprKind::Closure(_, _, id, _, _) = e.kind {
+ } else if let ExprKind::Closure { body: id, .. } = e.kind {
if is_res_used(self.cx, self.iter_expr.path, id) {
self.uses_iter = true;
}
v.uses_iter
}
-#[allow(clippy::too_many_lines)]
+#[expect(clippy::too_many_lines)]
fn needs_mutable_borrow(cx: &LateContext<'_>, iter_expr: &IterExpr, loop_expr: &Expr<'_>) -> bool {
struct AfterLoopVisitor<'a, 'b, 'tcx> {
cx: &'a LateContext<'tcx>,
if let Some(e) = e {
self.visit_expr(e);
}
- } else if let ExprKind::Closure(_, _, id, _, _) = e.kind {
+ } else if let ExprKind::Closure { body: id, .. } = e.kind {
self.used_iter = is_res_used(self.cx, self.iter_expr.path, id);
} else {
walk_expr(self, e);
if let Some(e) = e {
self.visit_expr(e);
}
- } else if let ExprKind::Closure(_, _, id, _, _) = e.kind {
+ } else if let ExprKind::Closure { body: id, .. } = e.kind {
self.used_after = is_res_used(self.cx, self.iter_expr.path, id);
} else {
walk_expr(self, e);