pub const fn new_non_null<T: ?Sized>(value: *mut T) -> NonNull<T>
Expand description

Similar to NonNull::new_unchecked() but checks are made when compiling with debug assertions.