accept naked exprs with commas in pattern arms
pretty printing will use them, but indentation is slightly off if the expr is long
This commit is contained in:
committed by
Brian Anderson
parent
a89ed49d3d
commit
c206d024eb
@@ -588,6 +588,13 @@ fn view_path_id(p: @view_path) -> node_id {
|
||||
}
|
||||
}
|
||||
|
||||
fn lone_block_expr(blk: blk) -> option<@ast::expr> {
|
||||
if blk.node.view_items.len() != 0 { ret none; }
|
||||
if blk.node.stmts.len() != 0 { ret none; }
|
||||
if blk.node.rules != default_blk { ret none; }
|
||||
ret blk.node.expr;
|
||||
}
|
||||
|
||||
// Local Variables:
|
||||
// mode: rust
|
||||
// fill-column: 78;
|
||||
|
||||
Reference in New Issue
Block a user