Add ErrorGuaranteed to ast::ExprKind::Err

This commit is contained in:
Lieselotte 2024-02-25 22:22:11 +01:00
parent 7d82dd0d31
commit 1bbfb76993
2 changed files with 2 additions and 2 deletions

View File

@ -404,7 +404,7 @@ pub(crate) fn format_expr(
// These do not occur in the AST because macros aren't expanded. // These do not occur in the AST because macros aren't expanded.
unreachable!() unreachable!()
} }
ast::ExprKind::Err | ast::ExprKind::Dummy => None, ast::ExprKind::Err(_) | ast::ExprKind::Dummy => None,
}; };
expr_rw expr_rw

View File

@ -498,7 +498,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
| ast::ExprKind::Cast(..) | ast::ExprKind::Cast(..)
| ast::ExprKind::Continue(..) | ast::ExprKind::Continue(..)
| ast::ExprKind::Dummy | ast::ExprKind::Dummy
| ast::ExprKind::Err | ast::ExprKind::Err(_)
| ast::ExprKind::Field(..) | ast::ExprKind::Field(..)
| ast::ExprKind::IncludedBytes(..) | ast::ExprKind::IncludedBytes(..)
| ast::ExprKind::InlineAsm(..) | ast::ExprKind::InlineAsm(..)