diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-01-13 19:26:49 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-01-13 19:26:49 +0300 |
| commit | 22598776b04cc947f001191b47c18d981b46eec7 (patch) | |
| tree | 10957127d28e9ccef3d2c793a9f968f8b2f30828 /src/libsyntax/parse | |
| parent | 8b4d852f32b6bf3fdec2cce6c0d2804b27d02a20 (diff) | |
| download | rust-22598776b04cc947f001191b47c18d981b46eec7.tar.gz rust-22598776b04cc947f001191b47c18d981b46eec7.zip | |
Re-add support for `impl Trait for ..` to the parser
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index ce42b05b8bb..ad9c802ac85 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5422,7 +5422,11 @@ impl<'a> Parser<'a> { }; if opt_trait.is_some() { - ty = self.parse_ty()?; + ty = if self.eat(&token::DotDot) { + P(Ty { node: TyKind::Err, span: self.prev_span, id: ast::DUMMY_NODE_ID }) + } else { + self.parse_ty()? + } } generics.where_clause = self.parse_where_clause()?; |
