1
Fork 0

Add ErrorGuaranteed to ast::ExprKind::Err

This commit is contained in:
Lieselotte 2024-02-25 22:22:11 +01:00
parent a3fce72a27
commit c440a5b814
No known key found for this signature in database
GPG key ID: 43A6A32F83A6F9B1
37 changed files with 660 additions and 602 deletions

View file

@ -1296,7 +1296,7 @@ impl Expr {
ExprKind::Yeet(..) => ExprPrecedence::Yeet,
ExprKind::FormatArgs(..) => ExprPrecedence::FormatArgs,
ExprKind::Become(..) => ExprPrecedence::Become,
ExprKind::Err | ExprKind::Dummy => ExprPrecedence::Err,
ExprKind::Err(_) | ExprKind::Dummy => ExprPrecedence::Err,
}
}
@ -1518,7 +1518,7 @@ pub enum ExprKind {
FormatArgs(P<FormatArgs>),
/// Placeholder for an expression that wasn't syntactically well formed in some way.
Err,
Err(ErrorGuaranteed),
/// Acts as a null expression. Lowering it will always emit a bug.
Dummy,