[−][src]Function pre::std::ptr::NonNull__impl__new_unchecked__
pub fn NonNull__impl__new_unchecked__()
A stub for the preconditions of the std::ptr::NonNull<T>::new_unchecked
function.
What is this function?
This function was generated by an impl
block inside a extern_crate
attribute that looked like this:
ⓘThis example is not tested
impl< T : ? Sized > NonNull < T > { const unsafe fn new_unchecked(ptr : * mut T) -> Self; }
Preconditions on external functions inside of an impl
block are attached to empty functions like this one.
When the preconditions should be checked, a call to this function is inserted, which triggers checking the preconditions.
This function has preconditions
This function has the following precondition generated by the pre
attribute:
! ptr . is_null()
To call the function you need to assure
that the precondition holds:
ⓘThis example is not tested
#[forward(impl pre::std::ptr::NonNull)] #[assure( ! ptr . is_null(), reason = "<specify the reason why you can assure this here>" )] new_unchecked(/* parameters omitted */);