1
Fork 0

make redundant StorageLive UB

This commit is contained in:
Ralf Jung 2020-11-21 20:23:00 +01:00
parent cc03ee6702
commit 78deacc2ec
2 changed files with 16 additions and 23 deletions

View file

@ -95,14 +95,12 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
// Mark locals as alive
StorageLive(local) => {
let old_val = self.storage_live(*local)?;
self.deallocate_local(old_val)?;
self.storage_live(*local)?;
}
// Mark locals as dead
StorageDead(local) => {
let old_val = self.storage_dead(*local);
self.deallocate_local(old_val)?;
self.storage_dead(*local)?;
}
// No dynamic semantics attached to `FakeRead`; MIR