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:
@@ -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))?;
|
||||
|
||||
Reference in New Issue
Block a user