Skip to content

Commit 50987bb

Browse files
committed
Auto merge of rust-lang#120586 - ShE3py:exprkind-err, r=fmease
Add `ErrorGuaranteed` to `ast::ExprKind::Err` See rust-lang#119967 for context ``` \ \ _~^~^~_ \) / o o \ (/ '_ - _' / '-----' \ ``` r? fmease
2 parents 8c33745 + 1bbfb76 commit 50987bb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ pub(crate) fn format_expr(
404404
// These do not occur in the AST because macros aren't expanded.
405405
unreachable!()
406406
}
407-
ast::ExprKind::Err => None,
407+
ast::ExprKind::Err(_) | ast::ExprKind::Dummy => None,
408408
};
409409

410410
expr_rw

src/utils.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,8 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
497497
| ast::ExprKind::Break(..)
498498
| ast::ExprKind::Cast(..)
499499
| ast::ExprKind::Continue(..)
500-
| ast::ExprKind::Err
500+
| ast::ExprKind::Dummy
501+
| ast::ExprKind::Err(_)
501502
| ast::ExprKind::Field(..)
502503
| ast::ExprKind::IncludedBytes(..)
503504
| ast::ExprKind::InlineAsm(..)

0 commit comments

Comments
 (0)