Skip to content
Permalink
Browse files

rustc_mir: add missing subst_from_frame_and_normalize_erasing_regions…

… calls.
  • Loading branch information...
eddyb committed Aug 12, 2019
1 parent 0919f7c commit 4149964ae4248bcf3a7bd95b3cc5f8cb7bb45d10
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/librustc_mir/interpret/operand.rs
@@ -522,7 +522,10 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
Move(ref place) =>
self.eval_place_to_op(place, layout)?,

Constant(ref constant) => self.eval_const_to_op(constant.literal, layout)?,
Constant(ref constant) => {
let val = self.subst_from_frame_and_normalize_erasing_regions(constant.literal);
self.eval_const_to_op(val, layout)?
}
};
trace!("{:?}: {:?}", mir_op, *op);
Ok(op)

0 comments on commit 4149964

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