diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-23 14:57:21 +0530 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-23 11:43:57 -0800 |
| commit | f1a6d67e5e5965c6d149454095261cb48ee22f48 (patch) | |
| tree | ca7bce86c32ee2827e6f2005e54a3f56ecb2f96a /src/libsyntax/parse/parser.rs | |
| parent | bff94bd3c5d4c7d485e17f38898e2f4599622770 (diff) | |
| parent | b13e072c9eb18796ffa7b61af5de0f0965186d24 (diff) | |
| download | rust-f1a6d67e5e5965c6d149454095261cb48ee22f48.tar.gz rust-f1a6d67e5e5965c6d149454095261cb48ee22f48.zip | |
Rollup merge of #22544 - bombless:fix-pattern, r=pnkfelix
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index f43b09ddb9d..7977574b02b 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3494,6 +3494,9 @@ impl<'a> Parser<'a> { }; pat = PatIdent(BindByValue(MutImmutable), pth1, sub); } + } else if self.look_ahead(1, |t| *t == token::Lt) { + self.bump(); + self.unexpected() } else { // parse an enum pat let enum_path = self.parse_path(LifetimeAndTypesWithColons); |
