remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata

This commit is contained in:
Kyle Matsuda 2023-02-07 01:29:48 -07:00
parent d822b97a27
commit c183110cc2
164 changed files with 325 additions and 380 deletions

View file

@ -27,7 +27,7 @@ use rustc_middle::ty::{self, Predicate, Ty, TyCtxt};
/// cannot do `struct S<T>; impl<T:Clone> Drop for S<T> { ... }`).
///
pub fn check_drop_impl(tcx: TyCtxt<'_>, drop_impl_did: DefId) -> Result<(), ErrorGuaranteed> {
let dtor_self_type = tcx.bound_type_of(drop_impl_did).subst_identity();
let dtor_self_type = tcx.type_of(drop_impl_did).subst_identity();
let dtor_predicates = tcx.predicates_of(drop_impl_did);
match dtor_self_type.kind() {
ty::Adt(adt_def, self_to_impl_substs) => {