1
Fork 0

hir: Add Become expression kind

This commit is contained in:
Maybe Waffle 2022-11-21 12:40:27 +00:00
parent 97bf23d26b
commit ccb71ff424
28 changed files with 268 additions and 72 deletions

View file

@ -277,9 +277,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
ExprKind::Yeet(sub_expr) => self.lower_expr_yeet(e.span, sub_expr.as_deref()),
ExprKind::Become(sub_expr) => {
let sub_expr = self.lower_expr(sub_expr);
// FIXME(explicit_tail_calls): Use `hir::ExprKind::Become` once we implemented it
hir::ExprKind::Ret(Some(sub_expr))
hir::ExprKind::Become(sub_expr)
}
ExprKind::InlineAsm(asm) => {
hir::ExprKind::InlineAsm(self.lower_inline_asm(e.span, asm))