pub fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr: &str) -> bool {
    match expr.node {
        ast::ExprKind::Mac(..)
        | ast::ExprKind::Call(..)
        | ast::ExprKind::MethodCall(..)
        | ast::ExprKind::Array(..)
        | ast::ExprKind::Struct(..)
        | ast::ExprKind::While(..)
        | ast::ExprKind::WhileLet(..)
        | ast::ExprKind::If(..)
        | ast::ExprKind::IfLet(..)
        | ast::ExprKind::Block(..)
        | ast::ExprKind::Loop(..)
        | ast::ExprKind::ForLoop(..)
        | ast::ExprKind::Match(..) => repr.contains('\n'),
        ast::ExprKind::Paren(ref expr)
        | ast::ExprKind::Binary(_, _, ref expr)
        | ast::ExprKind::Index(_, ref expr)
        | ast::ExprKind::Unary(_, ref expr)
        | ast::ExprKind::Closure(_, _, _, _, ref expr, _)
        | ast::ExprKind::Try(ref expr)
        | ast::ExprKind::Yield(Some(ref expr)) => is_block_expr(context, expr, repr),
        // This can only be a string lit
        ast::ExprKind::Lit(_) => {
            repr.contains('\n') && trimmed_last_line_width(repr) <= context.config.tab_spaces()
        }
        _ => false,
    }
}
// States whether an expression's last line exclusively consists of closing
// parens, braces, and brackets in its idiomatic formatting.
States whether an expression's last line exclusively consists of closing
parens, braces, and brackets in its idiomatic formatting.
States whether an expression ' s last line exclusively consists of closing parens braces and brackets in its idiomatic formatting .
pub fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr: &str) -> bool {
    match expr.node {
        ast::ExprKind::Mac(..)
        | ast::ExprKind::Call(..)
        | ast::ExprKind::MethodCall(..)
        | ast::ExprKind::Array(..)
        | ast::ExprKind::Struct(..)
        | ast::ExprKind::While(..)
        | ast::ExprKind::WhileLet(..)
        | ast::ExprKind::If(..)
        | ast::ExprKind::IfLet(..)
        | ast::ExprKind::Block(..)
        | ast::ExprKind::Loop(..)
        | ast::ExprKind::ForLoop(..)
        | ast::ExprKind::Match(..) => repr.contains('\n'),
        ast::ExprKind::Paren(ref expr)
        | ast::ExprKind::Binary(_, _, ref expr)
        | ast::ExprKind::Index(_, ref expr)
        | ast::ExprKind::Unary(_, ref expr)
        | ast::ExprKind::Closure(_, _, _, _, ref expr, _)
        | ast::ExprKind::Try(ref expr)
        | ast::ExprKind::Yield(Some(ref expr)) => is_block_expr(context, expr, repr),
        // This can only be a string lit
        ast::ExprKind::Lit(_) => {
            repr.contains('\n') && trimmed_last_line_width(repr) <= context.config.tab_spaces()
        }
        _ => false,
    }
}
pub fn is_block_expr ( context : & RewriteContext < ' _ > , expr : & ast :: Expr , repr : & str ) -> bool { match expr . node { ast :: ExprKind :: Mac ( .. ) | ast :: ExprKind :: Call ( .. ) | ast :: ExprKind :: MethodCall ( .. ) | ast :: ExprKind :: Array ( .. ) | ast :: ExprKind :: Struct ( .. ) | ast :: ExprKind :: While ( .. ) | ast :: ExprKind :: WhileLet ( .. ) | ast :: ExprKind :: If ( .. ) | ast :: ExprKind :: IfLet ( .. ) | ast :: ExprKind :: Block ( .. ) | ast :: ExprKind :: Loop ( .. ) | ast :: ExprKind :: ForLoop ( .. ) | ast :: ExprKind :: Match ( .. ) => repr . contains ( '\n' ) , ast :: ExprKind :: Paren ( ref expr ) | ast :: ExprKind :: Binary ( _ , _ , ref expr ) | ast :: ExprKind :: Index ( _ , ref expr ) | ast :: ExprKind :: Unary ( _ , ref expr ) | ast :: ExprKind :: Closure ( _ , _ , _ , _ , ref expr , _ ) | ast :: ExprKind :: Try ( ref expr ) | ast :: ExprKind :: Yield ( Some ( ref expr ) ) => is_block_expr ( context , expr , repr ) , // This can only be a string lit ast :: ExprKind :: Lit ( _ ) => { repr . contains ( '\n' ) && trimmed_last_line_width ( repr ) <= context . config . tab_spaces ( ) } _ => false , } }
States whether an expression's last line exclusively consists of closing
parens, braces, and brackets in its idiomatic formatting.
States whether an expression ' s last line exclusively consists of closing parens braces and brackets in its idiomatic formatting .
context
&RewriteContext<'_>
expr
&ast::Expr
repr
&str
context
&RewriteContext<'_>
expr
&ast::Expr
repr
&str