1
Fork 0

Remove hir::Guard

Use Expr instead. Use `ExprKind::Let` to represent if let guards.
This commit is contained in:
Matthew Jasper 2023-09-21 11:26:50 +00:00
parent 5113ed28ea
commit 407cb24142
17 changed files with 77 additions and 109 deletions

View file

@ -184,7 +184,8 @@ fn resolve_arm<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, arm: &'tcx hir
visitor.enter_node_scope_with_dtor(arm.hir_id.local_id);
visitor.cx.var_parent = visitor.cx.parent;
if let Some(hir::Guard::If(expr)) = arm.guard {
if let Some(expr) = arm.guard {
// Check for if??
visitor.terminating_scopes.insert(expr.hir_id.local_id);
}