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:
commit
8289a8916f
3 changed files with 6 additions and 3 deletions
|
@ -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))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue