1
Fork 0

Re-add support for impl Trait for .. to the parser

This commit is contained in:
Vadim Petrochenkov 2018-01-13 19:26:49 +03:00
parent 8b4d852f32
commit 22598776b0
4 changed files with 40 additions and 2 deletions

View file

@ -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()?;