-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
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 RFCT-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
Feature gate: #![feature(const_drop_in_place)]
This is a tracking issue for using drop_in_place in const contexts
Public API
// core::ptr
pub const unsafe fn drop_in_place<T: ?Sized + ~const Destruct>(to_drop: *mut T);Steps / History
- Implementation: Constified
array::from_fnandptr::drop_in_place#109122Final comment period (FCP)1Stabilization PRTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Unresolved Questions
- Confirm that things such as
dyn Traitworks with this as well
Footnotes
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 RFCT-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.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
juntyr commentedon Mar 19, 2023
@fee1-dead
The summary seems to link a different implementation PRUpon rereading the PR, I saw you also constifieddrop_in_placethere - perhaps the PR title could reflect this?ptr::drop_in_placeand related methods #146187Rollup merge of rust-lang#146187 - clarfonthey:const-drop-in-place, r…
Rollup merge of rust-lang#146187 - clarfonthey:const-drop-in-place, r…
Rollup merge of rust-lang#146187 - clarfonthey:const-drop-in-place, r…
Rollup merge of rust-lang#146187 - clarfonthey:const-drop-in-place, r…
Unrolled build for #146187
clarfonthey commentedon Oct 15, 2025
With #146187 merged, the description should be updated to include the following functions added to this list:
core::ptr::drop_in_placecore::mem::ManuallyDrop::dropcore::mem::MaybeUninit::assume_init_drop<[core::mem::MaybeUninit<_>]>::assume_init_drop<*mut _>::drop_in_placecore::ptr::NonNull::drop_in_placeAll of them are effectively wrappers over
drop_in_place, so, they made sense to include in this feature flag. They also all depend onconst_destruct(#133214) so that should be marked as a blocker for this as well.theemathas commentedon Oct 15, 2025
Currently, drop_in_place can be called on statics in consteval, which feels a bit odd to me. See #146187 (comment)
clarfonthey commentedon Oct 15, 2025
It probably makes more sense to file a separate issue for that now that this feature has been implemented again. Generally, tracking issues are just for listing blockers to stabilisation, not for elaborating on specific ones, which should each have dedicated issues.
Rollup merge of #146187 - clarfonthey:const-drop-in-place, r=oli-obk
Rollup merge of #146187 - clarfonthey:const-drop-in-place, r=oli-obk