Account sized bounds in parentheses printing inside of ptr/ref of rpit.

This commit is contained in:
Dawer 2021-08-03 17:01:00 +05:00
parent d9ec88ea23
commit 14898729f4
7 changed files with 153 additions and 38 deletions

View file

@ -828,7 +828,9 @@ impl<'a> TyLoweringContext<'a> {
trait_ref: TraitRef,
) -> impl Iterator<Item = QuantifiedWhereClause> + 'a {
let last_segment = match bound {
TypeBound::Path(path, TraitBoundModifier::None) | TypeBound::ForLifetime(_, path) => path.segments().last(),
TypeBound::Path(path, TraitBoundModifier::None) | TypeBound::ForLifetime(_, path) => {
path.segments().last()
}
TypeBound::Path(_, TraitBoundModifier::Maybe)
| TypeBound::Error
| TypeBound::Lifetime(_) => None,