-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
dropck: track order of destruction for r-value temporaries #22323
Copy link
Copy link
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.fixed-by-NLLBugs fixed, but only when NLL is enabled.Bugs fixed, but only when NLL is enabled.
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.fixed-by-NLLBugs fixed, but only when NLL is enabled.Bugs fixed, but only when NLL is enabled.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Spawned off of #21022, #21972; see also #21657.
Tracking order of destruction for r-value temporaries would (probably) allow us to resume writing code like this from RFC 769:
which is currently disallowed because the region inference system does not know that the temporary yielded by
stdin()will outlive the temporary fromstdin().lock().(But note that it might also have fallout, potentially worse than that of #21657)