Add macro to block expr

This commit is contained in:
topecongiro 2017-06-04 15:21:30 +09:00
parent 62d200d9cf
commit fabbef2c3e

View file

@ -339,6 +339,7 @@ fn join_rewrites(rewrites: &[String], subexps: &[ast::Expr], connector: &str) ->
// parens, braces, and brackets in its idiomatic formatting.
fn is_block_expr(context: &RewriteContext, expr: &ast::Expr, repr: &str) -> bool {
match expr.node {
ast::ExprKind::Mac(..) |
ast::ExprKind::Call(..) => context.use_block_indent() && repr.contains('\n'),
ast::ExprKind::Struct(..) |
ast::ExprKind::While(..) |