Closed
Description
#60840 introduces the expectation that once drop
runs on a local, it is UB for that local to be accessed, regardless of the success or failure (panic) of the drop
. Unfortunately, adding extra StorageDead
s for all of these values caused a performance regression, so at the moment we don't do this. #60840 instead uses drop
to indicate that a value is implicitly StorageDead
. However, this interacts poorly with drop elaboration, which can turn a drop
of a structure into drop
s of its fields.
Metadata
Metadata
Assignees
Labels
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: CoroutinesArea: Destructors (`Drop`, …)Category: An issue proposing an enhancement or a PR with one.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.