get rid of MemPlaceMeta::Poison

MPlaceTy::dangling still exists, but now it is only called in places that
actually conceptually allocate something new, so that's fine.
This commit is contained in:
Ralf Jung 2022-07-04 11:46:10 -04:00
parent ca4e39400e
commit 874a130ca0
6 changed files with 12 additions and 21 deletions

View file

@ -617,16 +617,14 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
place.to_ref(self),
self.layout_of(self.tcx.mk_mut_ptr(place.layout.ty))?,
);
let ty = self.tcx.mk_unit(); // return type is ()
let dest = MPlaceTy::dangling(self.layout_of(ty)?);
let ret = MPlaceTy::dangling(self.layout_of(self.tcx.types.unit)?);
self.eval_fn_call(
FnVal::Instance(instance),
(Abi::Rust, fn_abi),
&[arg.into()],
false,
&dest.into(),
&ret.into(),
Some(target),
match unwind {
Some(cleanup) => StackPopUnwind::Cleanup(cleanup),