Closed
Description
Let's use this issue to collect assumptions that rustc is making about MIR semantics. Usually those assumptions occur as an optimization.
- Generator optimization: Overlap locals that never have storage live at the same time rust#60187 assumes that after a
StorageDead
+StorageLive
, the address of a local is allowed to differ -- so old pointers (created before theStorageDead
) may not be used any more. Cc What about: StorageDead/StorageLive? #129 - Don't store locals that have been moved from in generators rust#61922 assumes that if the address of a local has not been taken, after moving out there is just no way to access that storage again. It can't be accessed through existing pointers because none have been created, and new pointers cannot be created because the move checker would prevent that.