1
Fork 0

Move trait bound modifiers into ast::PolyTraitRef

This commit is contained in:
Michael Goulet 2024-10-13 09:31:22 -04:00
parent 7500e09b8b
commit 95dba280b9
17 changed files with 118 additions and 103 deletions

View file

@ -333,12 +333,12 @@ fn contains_maybe_sized_bound_on_pointee(predicates: &[WherePredicate], pointee:
}
fn is_maybe_sized_bound(bound: &GenericBound) -> bool {
if let GenericBound::Trait(
trait_ref,
TraitBoundModifiers { polarity: ast::BoundPolarity::Maybe(_), .. },
) = bound
if let GenericBound::Trait(trait_ref) = bound
&& let TraitBoundModifiers { polarity: ast::BoundPolarity::Maybe(_), .. } =
trait_ref.modifiers
&& is_sized_marker(&trait_ref.trait_ref.path)
{
is_sized_marker(&trait_ref.trait_ref.path)
true
} else {
false
}