rustc_mir: add missing subst_from_frame_and_normalize_erasing_regions calls.

This commit is contained in:
Eduard-Mihai Burtescu 2019-08-12 16:33:38 +03:00
parent 0919f7c3a3
commit 4149964ae4

View File

@ -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)