Skip to content

Commit

Permalink
Use Instance.ty_env instead of Instance.monomorphic_ty in interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Jan 5, 2020
1 parent db2c4f2 commit 336b902
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
// to determine the type.
let drop_instance = self.memory.get_fn(drop_fn)?.as_instance()?;
trace!("Found drop fn: {:?}", drop_instance);
let fn_sig = drop_instance.monomorphic_ty(*self.tcx).fn_sig(*self.tcx);
let fn_sig = drop_instance.ty_env(*self.tcx, self.param_env).fn_sig(*self.tcx);
let fn_sig = self.tcx.normalize_erasing_late_bound_regions(self.param_env, &fn_sig);
// The drop function takes `*mut T` where `T` is the type being dropped, so get that.
let args = fn_sig.inputs();
Expand Down

0 comments on commit 336b902

Please sign in to comment.