Rollup merge of #22544 - bombless:fix-pattern, r=pnkfelix

This commit is contained in:
Manish Goregaokar
2015-02-23 14:57:21 +05:30
committed by Alex Crichton
5 changed files with 70 additions and 0 deletions

View File

@@ -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);