Skip to content

Commit 050978b

Browse files
committed
Fix the rustfmt build
1 parent 70067e3 commit 050978b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/expr.rs

+4
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ pub(crate) fn format_expr(
225225
ast::ExprKind::Ret(Some(ref expr)) => {
226226
rewrite_unary_prefix(context, "return ", &**expr, shape)
227227
}
228+
ast::ExprKind::Yeet(None) => Some("do yeet".to_owned()),
229+
ast::ExprKind::Yeet(Some(ref expr)) => {
230+
rewrite_unary_prefix(context, "do yeet ", &**expr, shape)
231+
}
228232
ast::ExprKind::Box(ref expr) => rewrite_unary_prefix(context, "box ", &**expr, shape),
229233
ast::ExprKind::AddrOf(borrow_kind, mutability, ref expr) => {
230234
rewrite_expr_addrof(context, borrow_kind, mutability, expr, shape)

src/utils.rs

+1
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
512512
| ast::ExprKind::Range(..)
513513
| ast::ExprKind::Repeat(..)
514514
| ast::ExprKind::Ret(..)
515+
| ast::ExprKind::Yeet(..)
515516
| ast::ExprKind::Tup(..)
516517
| ast::ExprKind::Type(..)
517518
| ast::ExprKind::Yield(None)

0 commit comments

Comments
 (0)