diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 4360fbeb9bbc1..a398fd80119be 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -1295,6 +1295,7 @@ impl Expr { ExprKind::Yield(..) => ExprPrecedence::Yield, ExprKind::Yeet(..) => ExprPrecedence::Yeet, ExprKind::FormatArgs(..) => ExprPrecedence::FormatArgs, + ExprKind::Become(..) => ExprPrecedence::Become, ExprKind::Err => ExprPrecedence::Err, } } @@ -1515,6 +1516,11 @@ pub enum ExprKind { /// with an optional value to be returned. Yeet(Option
>),
+ /// A tail call return, with the value to be returned.
+ ///
+ /// While `.0` must be a function call, we check this later, after parsing.
+ Become(P