about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbombless <bombless@126.com>2015-02-19 22:01:57 +0800
committerbombless <bombless@126.com>2015-02-19 22:01:57 +0800
commit61ea8b33d03b2b434793e6fc8f0a3cc67b90a72a (patch)
treeb18f374cbb8af04691c743474a27d0e9472c4c1c /src/libsyntax/parse/parser.rs
parentb6d91a2bdac45cd919497a24207fab843124d4ba (diff)
downloadrust-61ea8b33d03b2b434793e6fc8f0a3cc67b90a72a.tar.gz
rust-61ea8b33d03b2b434793e6fc8f0a3cc67b90a72a.zip
Fix issue #22426 #22447
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-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 d2133f03335..680554e2ad7 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3496,6 +3496,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);