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

@ -3590,7 +3590,7 @@ impl<'b, 'v> Visitor<'v> for ConditionVisitor<'b> {
));
} else if let Some(guard) = &arm.guard {
self.errors.push((
arm.pat.span.to(guard.body().span),
arm.pat.span.to(guard.span),
format!(
"if this pattern and condition are matched, {} is not \
initialized",