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
Unresolved Questions
Feature gate:
#![feature(set_ptr_value)]Public API
Steps / History
#[must_use]: Requested changes to [*mut T|*const T]::set_ptr_value #75407with_metadata_of: Refactor set_ptr_value as with_metadata_of #95249Unresolved Questions
*mut ()?*mut u8?*mut Opaque?