Skip to content

Commit 4149964

Browse files
committed
rustc_mir: add missing subst_from_frame_and_normalize_erasing_regions calls.
1 parent 0919f7c commit 4149964

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustc_mir/interpret/operand.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,10 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
522522
Move(ref place) =>
523523
self.eval_place_to_op(place, layout)?,
524524

525-
Constant(ref constant) => self.eval_const_to_op(constant.literal, layout)?,
525+
Constant(ref constant) => {
526+
let val = self.subst_from_frame_and_normalize_erasing_regions(constant.literal);
527+
self.eval_const_to_op(val, layout)?
528+
}
526529
};
527530
trace!("{:?}: {:?}", mir_op, *op);
528531
Ok(op)

0 commit comments

Comments
 (0)