diff options
| author | bombless <bombless@126.com> | 2015-02-19 22:01:57 +0800 |
|---|---|---|
| committer | bombless <bombless@126.com> | 2015-02-19 22:01:57 +0800 |
| commit | 61ea8b33d03b2b434793e6fc8f0a3cc67b90a72a (patch) | |
| tree | b18f374cbb8af04691c743474a27d0e9472c4c1c /src/libsyntax/parse | |
| parent | b6d91a2bdac45cd919497a24207fab843124d4ba (diff) | |
| download | rust-61ea8b33d03b2b434793e6fc8f0a3cc67b90a72a.tar.gz rust-61ea8b33d03b2b434793e6fc8f0a3cc67b90a72a.zip | |
Fix issue #22426 #22447
Diffstat (limited to 'src/libsyntax/parse')
| -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 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); |
