Auto merge of #120586 - ShE3py:exprkind-err, r=fmease

Add `ErrorGuaranteed` to `ast::ExprKind::Err`

See #119967 for context
```
      \
       \
          _~^~^~_
      \) /  o o  \ (/
        '_   -   _'
        / '-----' \
```

r? fmease
This commit is contained in:
bors 2024-02-26 14:43:15 +00:00
commit 50987bb36d
2 changed files with 3 additions and 2 deletions

View File

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

View File

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