Open
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?
Metadata
Metadata
Assignees
Labels
Area: raw pointers, MaybeUninit, NonNullBlocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCLibs issues that are tracked on the team's project board.Relevant to the library API team, which will review and decide on the PR/issue.