diff options
| author | bors <bors@rust-lang.org> | 2016-11-14 02:46:12 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-14 02:46:12 -0800 |
| commit | 8289a8916f9cf7d290a98121a75cee840faa9d0f (patch) | |
| tree | 7ed4b2e31762811bbc310b9b003bb11026b33faf /src/libsyntax | |
| parent | 7bef60a64894b0606ad9f5dc76256d5321b270a6 (diff) | |
| parent | cf9ff2b59bf876650b1e13ab66078bfd22ac85ef (diff) | |
| download | rust-8289a8916f9cf7d290a98121a75cee840faa9d0f.tar.gz rust-8289a8916f9cf7d290a98121a75cee840faa9d0f.zip | |
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.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c3f8a79c1cc..2e38ca82d5d 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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))?; |
