diff options
| author | bors <bors@rust-lang.org> | 2022-07-13 14:32:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-13 14:32:33 +0000 |
| commit | 42bd138126b0a9d38d65bc9973e72de3c5b6c37f (patch) | |
| tree | 5131b9e992cc222b6d221be7bab4351c72f028f3 /compiler/rustc_const_eval/src/interpret | |
| parent | ca4e39400ef33198e2715973d1c67a1d3cee15e7 (diff) | |
| parent | b4c3a2af7ba0199e99de8ef64a3b112824efebb6 (diff) | |
| download | rust-42bd138126b0a9d38d65bc9973e72de3c5b6c37f.tar.gz rust-42bd138126b0a9d38d65bc9973e72de3c5b6c37f.zip | |
Auto merge of #98145 - ouz-a:some_branch, r=oli-obk
Pull Derefer before ElaborateDrops _Follow up work to #97025 #96549 #96116 #95887 #95649_ This moves `Derefer` before `ElaborateDrops` and creates a new `Rvalue` called `VirtualRef` that allows us to bypass many constraints for `DerefTemp`. r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/step.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/step.rs b/compiler/rustc_const_eval/src/interpret/step.rs index 240910c08b2..fea158a9fe4 100644 --- a/compiler/rustc_const_eval/src/interpret/step.rs +++ b/compiler/rustc_const_eval/src/interpret/step.rs @@ -172,6 +172,11 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { self.copy_op(&op, &dest, /*allow_transmute*/ false)?; } + CopyForDeref(ref place) => { + let op = self.eval_place_to_op(*place, Some(dest.layout))?; + self.copy_op(&op, &dest, /* allow_transmute*/ false)?; + } + BinaryOp(bin_op, box (ref left, ref right)) => { let layout = binop_left_homogeneous(bin_op).then_some(dest.layout); let left = self.read_immediate(&self.eval_operand(left, layout)?)?; |
