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:
Patrick Walton 2012-07-19 07:53:55 -07:00
parent 00aa5f163f
commit 978ca03cb2
6 changed files with 6 additions and 76 deletions

View file

@ -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;