ErrorOutOfDeviceMemory = -2,
/// Initialization of a object has failed
ErrorInitializationFailed = -3,
- /// The logical device has been lost. See <<devsandqueues-lost-device>>
+ /// The logical device has been lost.
ErrorDeviceLost = -4,
/// Mapping of a memory object has failed
ErrorMemoryMapFailed = -5,
/// is in an initialized state. Calling this when the content is not yet fully initialized causes
/// immediate undefined behavior.
///
-/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
+/// [`MaybeUninit::assume_init`]: std::mem::MaybeUninit::assume_init
#[inline]
pub unsafe fn box_assume_init<T>(value: Box<MaybeUninit<T>>) -> Box<T> {
let raw = Box::into_raw(value);
/// This may only be called when
/// - The slice splits exactly into `N`-element chunks (aka `self.len() % N == 0`).
/// - `N != 0`.
-///
-/// // These would be unsound:
-/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
-/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
-/// ```
#[inline]
#[must_use]
pub unsafe fn as_chunks_unchecked<T, const N: usize>(slice: &[T]) -> &[[T; N]] {
/// This may only be called when
/// - The slice splits exactly into `N`-element chunks (aka `self.len() % N == 0`).
/// - `N != 0`.
-///
-/// // These would be unsound:
-/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5
-/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
-/// ```
#[inline]
#[must_use]
pub unsafe fn as_chunks_unchecked_mut<T, const N: usize>(slice: &mut [T]) -> &mut [[T; N]] {
///
/// Panics if `N` is 0. This check will most probably get changed to a compile time
/// error before this method gets stabilized.
-/// ```
#[inline]
#[must_use]
pub fn as_chunks_mut<T, const N: usize>(slice: &mut [T]) -> (&mut [[T; N]], &mut [T]) {