Skip to content

Commit

Permalink
Add ErrorGuaranteed to ast::ExprKind::Err
Browse files Browse the repository at this point in the history
  • Loading branch information
ShE3py committed Feb 25, 2024
1 parent 7d82dd0 commit 1bbfb76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ pub(crate) fn format_expr(
// These do not occur in the AST because macros aren't expanded.
unreachable!()
}
ast::ExprKind::Err | ast::ExprKind::Dummy => None,
ast::ExprKind::Err(_) | ast::ExprKind::Dummy => None,
};

expr_rw
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
| ast::ExprKind::Cast(..)
| ast::ExprKind::Continue(..)
| ast::ExprKind::Dummy
| ast::ExprKind::Err
| ast::ExprKind::Err(_)
| ast::ExprKind::Field(..)
| ast::ExprKind::IncludedBytes(..)
| ast::ExprKind::InlineAsm(..)
Expand Down

0 comments on commit 1bbfb76

Please sign in to comment.