Add ErrorGuaranteed to ast::ExprKind::Err

This commit is contained in:
Lieselotte
2024-02-25 22:22:11 +01:00
parent a3fce72a27
commit c440a5b814
37 changed files with 660 additions and 602 deletions

View File

@@ -329,9 +329,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
)
}
ExprKind::Yield(opt_expr) => self.lower_expr_yield(e.span, opt_expr.as_deref()),
ExprKind::Err => {
hir::ExprKind::Err(self.dcx().span_delayed_bug(e.span, "lowered ExprKind::Err"))
}
ExprKind::Err(guar) => hir::ExprKind::Err(*guar),
ExprKind::Dummy => {
span_bug!(e.span, "lowered ExprKind::Dummy")