about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2024-11-18 10:50:14 +0100
committerlcnr <rust@lcnr.de>2024-11-18 10:50:14 +0100
commit2e087d2eaac31863c55f67bc22d15d77b96c6fc3 (patch)
treec90a39bb9986e1caeaa41915807406c0ae36befa /compiler/rustc_hir_analysis/src
parent9cba14b95bb07a5b31ed1aac2bf4eadd248232da (diff)
downloadrust-2e087d2eaac31863c55f67bc22d15d77b96c6fc3.tar.gz
rust-2e087d2eaac31863c55f67bc22d15d77b96c6fc3.zip
review
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/check/wfcheck.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs
index d8bf7fdbb0f..20bc34b8c79 100644
--- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs
+++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs
@@ -1126,7 +1126,7 @@ fn check_type_defn<'tcx>(
                     let ty = tcx.type_of(variant.tail().did).instantiate_identity();
                     let ty = tcx.erase_regions(ty);
                     assert!(!ty.has_infer());
-                    ty.needs_drop(tcx, ty::TypingEnv::non_body_analysis(tcx, item.owner_id.def_id))
+                    ty.needs_drop(tcx, wfcx.infcx.typing_env(wfcx.param_env))
                 }
             };
             // All fields (except for possibly the last) should be sized.