remove DerefTemp and CopyFromDeref from runtime mir

This commit is contained in:
beepster4096
2025-08-13 02:09:20 -07:00
parent 8111a2d6da
commit fc959e5464
19 changed files with 122 additions and 82 deletions

View File

@@ -234,7 +234,7 @@ where
Rvalue::Discriminant(place) => in_place::<Q, _>(cx, in_local, place.as_ref()),
Rvalue::CopyForDeref(place) => in_place::<Q, _>(cx, in_local, place.as_ref()),
Rvalue::CopyForDeref(_) => bug!("`CopyForDeref` in runtime MIR"),
Rvalue::Use(operand)
| Rvalue::Repeat(operand, _)

View File

@@ -188,10 +188,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
self.copy_op(&op, &dest)?;
}
CopyForDeref(place) => {
let op = self.eval_place_to_op(place, Some(dest.layout))?;
self.copy_op(&op, &dest)?;
}
CopyForDeref(_) => bug!("`CopyForDeref` in runtime MIR"),
BinaryOp(bin_op, box (ref left, ref right)) => {
let layout = util::binop_left_homogeneous(bin_op).then_some(dest.layout);