1
Fork 0

Move binder and polarity parsing into parse_generic_ty_bound

This commit is contained in:
Michael Goulet 2024-06-28 19:37:21 -04:00
parent 036b38ced3
commit 3bc3247200
7 changed files with 204 additions and 40 deletions

View file

@ -457,7 +457,7 @@ impl<'a> Parser<'a> {
// * `for<'a> Trait1<'a>: Trait2<'a /* ok */>`
// * `(for<'a> Trait1<'a>): Trait2<'a /* not ok */>`
// * `for<'a> for<'b> Trait1<'a, 'b>: Trait2<'a /* ok */, 'b /* not ok */>`
let lifetime_defs = self.parse_late_bound_lifetime_defs()?;
let (lifetime_defs, _) = self.parse_late_bound_lifetime_defs()?;
// Parse type with mandatory colon and (possibly empty) bounds,
// or with mandatory equality sign and the second type.