Skip to content
Browse files

rustc_mir: use self.resolve instead of Instance::resolve where possible.

  • Loading branch information...
eddyb committed Aug 12, 2019
1 parent ada6f1c commit 0919f7c3a3690f7a0528e8447f8a9741eee45674
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/librustc_mir/interpret/
@@ -39,12 +39,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
if self.tcx.has_attr(def_id, sym::rustc_args_required_const) {
bug!("reifying a fn ptr that requires const arguments");
let instance = ty::Instance::resolve(
).ok_or_else(|| err_inval!(TooGeneric))?;
let instance = self.resolve(def_id, substs)?;
let fn_ptr = self.memory.create_fn_alloc(FnVal::Instance(instance));
self.write_scalar(Scalar::Ptr(fn_ptr.into()), dest)?;

0 comments on commit 0919f7c

Please sign in to comment.
You can’t perform that action at this time.