1
Fork 0

Avoid storing the ImplPolarity and Constness next to a TraitRef and use TraitPredicate instead

This commit is contained in:
Oli Scherer 2021-10-25 14:29:54 +00:00 committed by Deadbeef
parent d161cc2071
commit a848c4ba3f
No known key found for this signature in database
GPG key ID: 6D017A96D8E6C2F9
11 changed files with 59 additions and 53 deletions

View file

@ -508,9 +508,9 @@ crate fn to_pretty_impl_header(tcx: TyCtxt<'_>, impl_def_id: DefId) -> Option<St
Vec::with_capacity(predicates.len() + types_without_default_bounds.len());
for (p, _) in predicates {
if let Some(poly_trait_ref) = p.to_opt_poly_trait_ref() {
if Some(poly_trait_ref.value.def_id()) == sized_trait {
types_without_default_bounds.remove(poly_trait_ref.value.self_ty().skip_binder());
if let Some(poly_trait_ref) = p.to_opt_poly_trait_pred() {
if Some(poly_trait_ref.def_id()) == sized_trait {
types_without_default_bounds.remove(poly_trait_ref.self_ty().skip_binder());
continue;
}
}