Skip to content

Commit 070b1c8

Browse files
Austin Seippbrson
authored andcommitted
Remove support for 'when' in alt-patterns from parser
Issue #1396
1 parent a94b1cc commit 070b1c8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/comp/syntax/parse/parser.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,11 +1389,7 @@ fn parse_alt_expr(p: parser) -> @ast::expr {
13891389
while p.peek() != token::RBRACE {
13901390
let pats = parse_pats(p);
13911391
let guard = none;
1392-
if eat_word(p, "when") {
1393-
guard = some(parse_expr(p));
1394-
} else if eat_word(p, "if") {
1395-
guard = some(parse_expr(p));
1396-
}
1392+
if eat_word(p, "if") { guard = some(parse_expr(p)); }
13971393
let blk = parse_block(p);
13981394
arms += [{pats: pats, guard: guard, body: blk}];
13991395
}

0 commit comments

Comments
 (0)