diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-08-12 16:33:38 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-08-19 18:57:09 +0300 |
| commit | 4149964ae4248bcf3a7bd95b3cc5f8cb7bb45d10 (patch) | |
| tree | 4f75ab8cc92254883143936a5231bc45d943d9fb /src | |
| parent | 0919f7c3a3690f7a0528e8447f8a9741eee45674 (diff) | |
| download | rust-4149964ae4248bcf3a7bd95b3cc5f8cb7bb45d10.tar.gz rust-4149964ae4248bcf3a7bd95b3cc5f8cb7bb45d10.zip | |
rustc_mir: add missing subst_from_frame_and_normalize_erasing_regions calls.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_mir/interpret/operand.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs index f0559b13c33..7a545e8ad6f 100644 --- a/src/librustc_mir/interpret/operand.rs +++ b/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) |
