mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-21 19:33:16 +00:00
Allow any alternative (not just a block) to follow a nullary tag pattern
This commit is contained in:
parent
209d8c854f
commit
8c97854c7d
@ -1508,11 +1508,9 @@ fn parse_pat(p: parser) -> @ast::pat {
|
||||
args = a.node;
|
||||
hi = a.span.hi;
|
||||
}
|
||||
token::LBRACE. | token::RPAREN. | token::COMMA.
|
||||
| token::BINOP(token::OR.) { args = []; }
|
||||
// take this out once the libraries change
|
||||
token::DOT. { args = []; p.bump(); }
|
||||
_ { expect(p, token::LPAREN); fail; }
|
||||
_ { args = []; }
|
||||
}
|
||||
// at this point, we're not sure whether it's a tag or a bind
|
||||
if vec::len(args) == 0u &&
|
||||
|
Loading…
Reference in New Issue
Block a user