Feature gate: #![feature(non_null_from_ref)]
This is a tracking issue for adding the convenience constructors from_ref and from_mut to core::ptr::NonNull.
Public API
// core::ptr impl<T: ?Sized> NonNull<T> { pub const fn from_ref(r: &T) -> Self; pub const fn from_mut(r: &mut T) -> Self; }
Steps / History
- API change proposal (ACP): #448
- Implementation: Add
from_refandfrom_mutconstructors tocore::ptr::NonNull. #130822 - Final comment period (FCP)
- Stabilization PR: Stabilize
#![feature(non_null_from_ref)]#140511
Unresolved Questions
- None yet.