-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Origin: #102023 (comment)
It's a bit weird to have forget
and ManuallyDrop
, especially since forget is just a let _ = ManuallyDrop::new(t);
under the hood. The primary usage of forget
that still makes sense is for panic guards, but using forget
has the disadvantage of being unclear in its intent. Removing forget
would probably make panic guards clearer as they would encourage writing a comment or seperate method explaining what's happening.
Metadata
Metadata
Assignees
Labels
T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.