Revert "accept naked exprs with commas in pattern arms" due to pretty-printing failures
This reverts commit f712b2d76b.
In alt arms, the parser needs to do a little lookahead to determine
whether it's looking at a record literal or a block.
Also there are some indentation issues in the expected source.
This commit is contained in:
@@ -568,13 +568,6 @@ 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