From cf9ff2b59bf876650b1e13ab66078bfd22ac85ef Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Oct 2016 18:21:27 +0300 Subject: Fix where clauses parsing Don't allow lifetimes without any bounds at all --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse/parser.rs') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 61268d457ce..e1de32de790 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4440,7 +4440,7 @@ impl<'a> Parser<'a> { let bounded_lifetime = self.parse_lifetime()?; - self.eat(&token::Colon); + self.expect(&token::Colon)?; let bounds = self.parse_lifetimes(token::BinOp(token::Plus))?; -- cgit 1.4.1-3-g733a5