about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-02-23 14:57:21 +0530
committerAlex Crichton <alex@alexcrichton.com>2015-02-23 11:43:57 -0800
commitf1a6d67e5e5965c6d149454095261cb48ee22f48 (patch)
treeca7bce86c32ee2827e6f2005e54a3f56ecb2f96a /src/libsyntax/parse
parentbff94bd3c5d4c7d485e17f38898e2f4599622770 (diff)
parentb13e072c9eb18796ffa7b61af5de0f0965186d24 (diff)
downloadrust-f1a6d67e5e5965c6d149454095261cb48ee22f48.tar.gz
rust-f1a6d67e5e5965c6d149454095261cb48ee22f48.zip
Rollup merge of #22544 - bombless:fix-pattern, r=pnkfelix
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs3
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);