Added support for trait aliases as object types.

This commit is contained in:
Alexander Regueiro
2018-10-22 00:45:24 +01:00
parent 34792d9f6a
commit 90041d638b
7 changed files with 43 additions and 34 deletions

View File

@@ -1532,7 +1532,7 @@ impl<'a> Parser<'a> {
if maybe_bounds && bounds.len() == 1 && !trailing_plus => {
let path = match bounds[0] {
GenericBound::Trait(ref pt, ..) => pt.trait_ref.path.clone(),
_ => self.bug("unexpected lifetime bound"),
GenericBound::Outlives(..) => self.bug("unexpected lifetime bound"),
};
self.parse_remaining_bounds(Vec::new(), path, lo, true)?
}