Re-add support for impl Trait for ..
to the parser
This commit is contained in:
parent
8b4d852f32
commit
22598776b0
4 changed files with 40 additions and 2 deletions
|
@ -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()?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue