change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
This commit is contained in:
parent
be130b57d4
commit
f29a334c90
59 changed files with 108 additions and 127 deletions
|
|
@ -33,7 +33,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
|
|||
trait_def_id,
|
||||
impl_def_id
|
||||
);
|
||||
let trait_ref = cx.tcx.bound_impl_trait_ref(impl_def_id).unwrap();
|
||||
let trait_ref = cx.tcx.impl_trait_ref(impl_def_id).unwrap();
|
||||
if !matches!(trait_ref.0.self_ty().kind(), ty::Param(_)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.bound_impl_trait_ref(did).map(ty::EarlyBinder::skip_binder);
|
||||
let associated_trait = tcx.impl_trait_ref(did).map(ty::EarlyBinder::skip_binder);
|
||||
|
||||
// Only inline impl if the implemented trait is
|
||||
// reachable in rustdoc generated documentation
|
||||
|
|
|
|||
|
|
@ -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.bound_impl_trait_ref(tcx.parent(assoc_item.def_id)).is_some()
|
||||
tcx.impl_trait_ref(tcx.parent(assoc_item.def_id)).is_some()
|
||||
}
|
||||
};
|
||||
if is_trait_item {
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ 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.bound_impl_trait_ref(impl_).expect("this is not an inherent impl");
|
||||
let trait_ref = tcx.impl_trait_ref(impl_).expect("this is not an inherent impl");
|
||||
// Check if these are the same type.
|
||||
let impl_type = trait_ref.subst_identity().self_ty();
|
||||
trace!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue