bjoernager · GitHub

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

Unresolved Questions

  • None yet.

Read the original on github.com ↗