.impl_trait_ref(impl_def_id)
else { return; };
let trait_substs = trait_ref
+ .subst_identity()
// Replace the explicit self type with `Self` for better suggestion rendering
.with_self_ty(self.tcx, self.tcx.mk_ty_param(0, kw::SelfUpper))
.substs;
let Ok(trait_predicates) = self
.tcx
- .bound_explicit_predicates_of(trait_item_def_id)
- .map_bound(|p| p.predicates)
- .subst_iter_copied(self.tcx, trait_item_substs)
+ .explicit_predicates_of(trait_item_def_id)
+ .instantiate_own(self.tcx, trait_item_substs)
.map(|(pred, _)| {
if pred.is_suggestable(self.tcx, false) {
Ok(pred.to_string())