Skip to content

Commit 336b902

Browse files
committed
Use Instance.ty_env instead of Instance.monomorphic_ty in interpreter
1 parent db2c4f2 commit 336b902

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/interpret/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
140140
// to determine the type.
141141
let drop_instance = self.memory.get_fn(drop_fn)?.as_instance()?;
142142
trace!("Found drop fn: {:?}", drop_instance);
143-
let fn_sig = drop_instance.monomorphic_ty(*self.tcx).fn_sig(*self.tcx);
143+
let fn_sig = drop_instance.ty_env(*self.tcx, self.param_env).fn_sig(*self.tcx);
144144
let fn_sig = self.tcx.normalize_erasing_late_bound_regions(self.param_env, &fn_sig);
145145
// The drop function takes `*mut T` where `T` is the type being dropped, so get that.
146146
let args = fn_sig.inputs();

0 commit comments

Comments
 (0)