@@ -452,8 +452,10 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
452452 | ast:: ExprKind :: While ( ..)
453453 | ast:: ExprKind :: If ( ..)
454454 | ast:: ExprKind :: Block ( ..)
455+ | ast:: ExprKind :: Async ( ..)
455456 | ast:: ExprKind :: Loop ( ..)
456457 | ast:: ExprKind :: ForLoop ( ..)
458+ | ast:: ExprKind :: TryBlock ( ..)
457459 | ast:: ExprKind :: Match ( ..) => repr. contains ( '\n' ) ,
458460 ast:: ExprKind :: Paren ( ref expr)
459461 | ast:: ExprKind :: Binary ( _, _, ref expr)
@@ -466,7 +468,25 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
466468 ast:: ExprKind :: Lit ( _) => {
467469 repr. contains ( '\n' ) && trimmed_last_line_width ( repr) <= context. config . tab_spaces ( )
468470 }
469- _ => false ,
471+ ast:: ExprKind :: AddrOf ( ..)
472+ | ast:: ExprKind :: Assign ( ..)
473+ | ast:: ExprKind :: AssignOp ( ..)
474+ | ast:: ExprKind :: Await ( ..)
475+ | ast:: ExprKind :: Box ( ..)
476+ | ast:: ExprKind :: Break ( ..)
477+ | ast:: ExprKind :: Cast ( ..)
478+ | ast:: ExprKind :: Continue ( ..)
479+ | ast:: ExprKind :: Err
480+ | ast:: ExprKind :: Field ( ..)
481+ | ast:: ExprKind :: InlineAsm ( ..)
482+ | ast:: ExprKind :: Let ( ..)
483+ | ast:: ExprKind :: Path ( ..)
484+ | ast:: ExprKind :: Range ( ..)
485+ | ast:: ExprKind :: Repeat ( ..)
486+ | ast:: ExprKind :: Ret ( ..)
487+ | ast:: ExprKind :: Tup ( ..)
488+ | ast:: ExprKind :: Type ( ..)
489+ | ast:: ExprKind :: Yield ( None ) => false ,
470490 }
471491}
472492
0 commit comments