1
Fork 0

Directly fetch the impl self type

This commit is contained in:
Oli Scherer 2025-04-01 09:35:59 +00:00
parent 6697f02761
commit 7192a0643d

View file

@ -54,9 +54,9 @@ pub(crate) fn check_drop_impl(
tcx.ensure_ok().orphan_check_impl(drop_impl_did)?; tcx.ensure_ok().orphan_check_impl(drop_impl_did)?;
let dtor_impl_trait_ref = tcx.impl_trait_ref(drop_impl_did).unwrap().instantiate_identity(); let self_ty = tcx.type_of(drop_impl_did).instantiate_identity();
match dtor_impl_trait_ref.self_ty().kind() { match self_ty.kind() {
ty::Adt(adt_def, adt_to_impl_args) => { ty::Adt(adt_def, adt_to_impl_args) => {
ensure_impl_params_and_item_params_correspond( ensure_impl_params_and_item_params_correspond(
tcx, tcx,