Remove NullOp::Box
This commit is contained in:
parent
6162529a01
commit
1b7f5a3818
11 changed files with 2 additions and 92 deletions
|
@ -267,10 +267,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
self.write_immediate(place.to_ref(self), &dest)?;
|
||||
}
|
||||
|
||||
NullaryOp(mir::NullOp::Box, _) => {
|
||||
M::box_alloc(self, &dest)?;
|
||||
}
|
||||
|
||||
NullaryOp(null_op, ty) => {
|
||||
let ty = self.subst_from_current_frame_and_normalize_erasing_regions(ty);
|
||||
let layout = self.layout_of(ty)?;
|
||||
|
@ -285,7 +281,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
let val = match null_op {
|
||||
mir::NullOp::SizeOf => layout.size.bytes(),
|
||||
mir::NullOp::AlignOf => layout.align.abi.bytes(),
|
||||
mir::NullOp::Box => unreachable!(),
|
||||
};
|
||||
self.write_scalar(Scalar::from_machine_usize(val, self), &dest)?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue