Add ErrorGuaranteed to HIR ExprKind::Err

This commit is contained in:
Michael Goulet 2023-02-22 22:40:06 +00:00
parent a772a6fc2a
commit c0e58c3420
14 changed files with 50 additions and 33 deletions

View file

@ -1688,7 +1688,7 @@ impl Expr<'_> {
ExprKind::Struct(..) => ExprPrecedence::Struct,
ExprKind::Repeat(..) => ExprPrecedence::Repeat,
ExprKind::Yield(..) => ExprPrecedence::Yield,
ExprKind::Err => ExprPrecedence::Err,
ExprKind::Err(_) => ExprPrecedence::Err,
}
}
@ -1754,7 +1754,7 @@ impl Expr<'_> {
| ExprKind::Yield(..)
| ExprKind::Cast(..)
| ExprKind::DropTemps(..)
| ExprKind::Err => false,
| ExprKind::Err(_) => false,
}
}
@ -1840,7 +1840,7 @@ impl Expr<'_> {
| ExprKind::Binary(..)
| ExprKind::Yield(..)
| ExprKind::DropTemps(..)
| ExprKind::Err => true,
| ExprKind::Err(_) => true,
}
}
@ -2013,7 +2013,7 @@ pub enum ExprKind<'hir> {
Yield(&'hir Expr<'hir>, YieldSource),
/// A placeholder for an expression that wasn't syntactically well formed in some way.
Err,
Err(rustc_span::ErrorGuaranteed),
}
/// Represents an optionally `Self`-qualified value/type path or associated extension.