change usages of impl_trait_ref to bound_impl_trait_ref

This commit is contained in:
Kyle Matsuda 2023-01-10 14:22:52 -07:00
parent ef58baf8b8
commit be130b57d4
47 changed files with 134 additions and 100 deletions

View file

@ -376,7 +376,7 @@ pub(crate) fn build_impl(
let _prof_timer = cx.tcx.sess.prof.generic_activity("build_impl");
let tcx = cx.tcx;
let associated_trait = tcx.impl_trait_ref(did);
let associated_trait = tcx.bound_impl_trait_ref(did).map(ty::EarlyBinder::skip_binder);
// Only inline impl if the implemented trait is
// reachable in rustdoc generated documentation

View file

@ -734,7 +734,7 @@ impl Item {
ty::ImplContainer => {
// Trait impl items always inherit the impl's visibility --
// we don't want to show `pub`.
tcx.impl_trait_ref(tcx.parent(assoc_item.def_id)).is_some()
tcx.bound_impl_trait_ref(tcx.parent(assoc_item.def_id)).is_some()
}
};
if is_trait_item {

View file

@ -784,9 +784,9 @@ fn trait_impls_for<'a>(
// Look at each trait implementation to see if it's an impl for `did`
tcx.find_map_relevant_impl(trait_, ty, |impl_| {
let trait_ref = tcx.impl_trait_ref(impl_).expect("this is not an inherent impl");
let trait_ref = tcx.bound_impl_trait_ref(impl_).expect("this is not an inherent impl");
// Check if these are the same type.
let impl_type = trait_ref.self_ty();
let impl_type = trait_ref.subst_identity().self_ty();
trace!(
"comparing type {} with kind {:?} against type {:?}",
impl_type,