-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-raw-pointersArea: raw pointers, MaybeUninit, NonNullArea: raw pointers, MaybeUninit, NonNullB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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 RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.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
Feature gate: #![feature(set_ptr_value)]
Public API
impl<T: ?Sized> *mut T {
pub fn with_metadata_of<U: ?Sized>(self, val: *const U) -> *mut U;
}
impl<T: ?Sized> *const T {
pub fn with_metadata_of<U: ?Sized>(self, val: *const U) -> *const U;
}
Steps / History
- Implementation: adds [*mut|*const] ptr::set_ptr_value #74774
- Change type and add
#[must_use]
: Requested changes to [*mut T|*const T]::set_ptr_value #75407 - Reverse argument order and rename to
with_metadata_of
: Refactor set_ptr_value as with_metadata_of #95249 - Const argument for mutable with_metadata_of: Adjust argument type for mutable with_metadata_of (#75091) #103346
- Final commenting period (FCP)
- Stabilization PR
Unresolved Questions
- Correct argument type --
*mut ()
?*mut u8
?*mut Opaque
? - Is this even needed/useful given that there now also is Tracking Issue for pointer metadata APIs #81513?
197g, yvt, rwestphal, js2xxx, luketpeterson and 1 moresrijs and luketpetersonjoseluis
Metadata
Metadata
Assignees
Labels
A-raw-pointersArea: raw pointers, MaybeUninit, NonNullArea: raw pointers, MaybeUninit, NonNullB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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 RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.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.