Skip to content

Commit 5495c2c

Browse files
committed
Directly fetch the impl self type
1 parent 3a646ff commit 5495c2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_hir_analysis/src/check/always_applicable.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ pub(crate) fn check_drop_impl(
5454

5555
tcx.ensure_ok().orphan_check_impl(drop_impl_did)?;
5656

57-
let dtor_impl_trait_ref = tcx.impl_trait_ref(drop_impl_did).unwrap().instantiate_identity();
57+
let self_ty = tcx.type_of(drop_impl_did).instantiate_identity();
5858

59-
match dtor_impl_trait_ref.self_ty().kind() {
59+
match self_ty.kind() {
6060
ty::Adt(adt_def, adt_to_impl_args) => {
6161
ensure_impl_params_and_item_params_correspond(
6262
tcx,

0 commit comments

Comments
 (0)