From 61ea8b33d03b2b434793e6fc8f0a3cc67b90a72a Mon Sep 17 00:00:00 2001 From: bombless Date: Thu, 19 Feb 2015 22:01:57 +0800 Subject: Fix issue #22426 #22447 --- src/libsyntax/parse/parser.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libsyntax') 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); -- cgit 1.4.1-3-g733a5