Auto merge of #37278 - matklad:lone-lifetime, r=jseyfried

Fix syntax error in the compiler

Currently `rustc` accepts the following code: `fn f<'a>() where 'a {}`. This should be a syntax error, shouldn't it?

Not sure if my changes actually compile, waiting for the LLVM to build.
This commit is contained in:
bors 2016-11-14 02:46:12 -08:00 committed by GitHub
commit 8289a8916f
3 changed files with 6 additions and 3 deletions

View file

@ -4409,7 +4409,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))?;