[−][src]Function pre::core::mut_pointer__impl__copy_to_nonoverlapping__
pub fn mut_pointer__impl__copy_to_nonoverlapping__()
A stub for the preconditions of the core::mut_pointer<T>::copy_to_nonoverlapping
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 > mut_pointer < T > where T : ? Sized { unsafe fn copy_to_nonoverlapping(self, dest : * mut T, count : usize); /* other items omitted */ }
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 preconditions generated by pre
attributes:
- the pointer
self
must be valid for reads - the pointer
dest
must be valid for writes self
is valid forcount * size_of::<T>()
bytesdest
is valid forcount * size_of::<T>()
bytes- the pointer
self
must have a proper alignment for its type - the pointer
dest
must have a proper alignment for its type - the memory regions of size
count * size_of::<T>
pointed to byself
anddest
do not overlap T
isCopy
or only the values in one of the regions are used after this call
To call the function you need to assure
that the preconditions hold:
ⓘThis example is not tested
#[forward(impl pre::core::mut_pointer)] #[assure( valid_ptr(self, r), reason = "<specify the reason why you can assure this here>" )] #[assure( valid_ptr(dest, w), reason = "<specify the reason why you can assure this here>" )] #[assure( "`self` is valid for `count * size_of::<T>()` bytes", reason = "<specify the reason why you can assure this here>" )] #[assure( "`dest` is valid for `count * size_of::<T>()` bytes", reason = "<specify the reason why you can assure this here>" )] #[assure( proper_align(self), reason = "<specify the reason why you can assure this here>" )] #[assure( proper_align(dest), reason = "<specify the reason why you can assure this here>" )] #[assure( "the memory regions of size `count * size_of::<T>` pointed to by `self` and `dest` do not overlap", reason = "<specify the reason why you can assure this here>" )] #[assure( "`T` is `Copy` or only the values in one of the regions are used after this call", reason = "<specify the reason why you can assure this here>" )] x.copy_to_nonoverlapping(/* parameters omitted */);