-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-coroutinesArea: CoroutinesArea: CoroutinesA-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
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
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-coroutinesArea: CoroutinesArea: CoroutinesA-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team