-
-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Tracking Issue for core::mem::DropGuard #144426
Copy link
Copy link
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-ready-to-stabilizeStatus: This is ready to stabilize; it may need a stabilization report and a PRStatus: This is ready to stabilize; it may need a stabilization report and a PRT-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.
Description
Activity
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-ready-to-stabilizeStatus: This is ready to stabilize; it may need a stabilization report and a PRStatus: This is ready to stabilize; it may need a stabilization report and a PRT-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.
View all comments
Feature gate:
#![feature(drop_guard)]This is a tracking issue for the
core::mem::DropGuardAPI: a helper type that makes it easy to createimpl Dropdestructors inline.Public API
Example
Steps / History
(Remember to update the
S-tracking-*label when checking boxes.)core::mem::DropGuard#144236DropGuard::into_innertoDropGuard::dismiss#148589 (comment)std: Usedrop_guardin some places in {core,alloc,std} #161702drop_guardin some places in {core,alloc,std}" #162128dropmethod#[inline]: Mark<mem::DropGuard as Drop>::dropas#[inline]#162064core::mem::DropGuard#161520Unresolved Questions
DropGuard,WithDropandDropperwere some of the preferred options raised in the 2025-07-22 T-Libs-API call.into_inner, but other names have been proposed, including:disarm,defuse,disable, andskip_drop.Cloneimpl? This can always be added in the future, but should be discussed further prior to stabilization.Debugimpl be transparent? This can always be added in the future, but should be discussed further prior to stabilization.Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩