pub const fn new_non_null<T: ?Sized>(value: *mut T) -> NonNull<T>
{
	if cfg!(debug_assertions)
	{
		if value.is_null()
		{
			panic!("Null for NonNull")
		}
	}
	
	unsafe { NonNull::new_unchecked(value) }
}
/// Similar to `NonNull::new_unchecked()` but checks are made when compiling with debug assertions.
Similar to `NonNull::new_unchecked()` but checks are made when compiling with debug assertions.
Similar to ` NonNull :: new_unchecked () ` but checks are made when compiling with debug assertions .
pub const fn new_non_null<T: ?Sized>(value: *mut T) -> NonNull<T>
{
	if cfg!(debug_assertions)
	{
		if value.is_null()
		{
			panic!("Null for NonNull")
		}
	}
	unsafe { NonNull::new_unchecked(value) }
}
pub const fn new_non_null < T : ? Sized > ( value : * mut T ) -> NonNull < T > { if cfg ! ( debug_assertions ) { if value . is_null ( ) { panic ! ( " " ) } } unsafe { NonNull :: new_unchecked ( value ) } }
Similar to `NonNull::new_unchecked()` but checks are made when compiling with debug assertions.
Similar to ` NonNull :: new_unchecked () ` but checks are made when compiling with debug assertions .
value
*mut T
value
*mut T