mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
No longer allow 'case' keyword before patterns
This commit is contained in:
@@ -1336,11 +1336,7 @@ fn parse_alt_expr(p: &parser) -> @ast::expr {
|
||||
// Optionally eat the case keyword.
|
||||
// FIXME remove this (and the optional parens) once we've updated our
|
||||
// code to not use the old syntax
|
||||
eat_word(p, "case");
|
||||
let parens = false;
|
||||
if p.peek() == token::LPAREN { parens = true; p.bump(); }
|
||||
let pats = parse_pats(p);
|
||||
if parens { expect(p, token::RPAREN); }
|
||||
let blk = parse_block(p);
|
||||
arms += ~[{pats: pats, block: blk}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user