Lines Matching defs:MaybeUninit

370     mem::{self, ManuallyDrop, MaybeUninit as CoreMaybeUninit},
765 /// `Self::LAYOUT` and `Self::MaybeUninit::LAYOUT` are identical.
766 /// `Self::MaybeUninit` admits uninitialized bytes in all positions.
768 type MaybeUninit: ?Sized + KnownLayout<PointerMetadata = Self::PointerMetadata>;
1040 // [1] Per https://doc.rust-lang.org/1.81.0/std/mem/union.MaybeUninit.html#layout-1:
1042 // `MaybeUninit<T>` is guaranteed to have the same size, alignment, and ABI as
1055 type MaybeUninit = [CoreMaybeUninit<T>];
1209 // - By consequence of the invariant on `T::MaybeUninit` that `T::LAYOUT` and
1210 // `T::MaybeUninit::LAYOUT` are equal, `T` and `T::MaybeUninit` have the same:
1214 // - By consequence of the above, referents `T::MaybeUninit` and `T` have the
1216 // an `as` cast from `*mut T` and `*mut T::MaybeUninit`, and this operation
1219 unsafe_impl_known_layout!(T: ?Sized + KnownLayout => #[repr(T::MaybeUninit)] MaybeUninit<T>)
3530 // `MaybeUninit<T>` may discard initialized bytes at `T`'s padding offsets
3534 // [1] Per https://doc.rust-lang.org/1.93.1/std/mem/union.MaybeUninit.html#validity:
3536 // Moving or copying a value of type `MaybeUninit<T>` (i.e., performing a
3546 // `MaybeUninit<T>` has `T`'s size. Both pointers are non-null and aligned
3554 // pattern is valid for `MaybeUninit<T>` [3], even if it is invalid for `T`.
3561 // [3] Per https://doc.rust-lang.org/1.56.0/std/mem/union.MaybeUninit.html#layout:
3563 // ... any bit value is valid for a `MaybeUninit<T>` ...
3578 // has not been moved since. Since `candidate` is a `MaybeUninit`, it has no
3589 // address is aligned for `MaybeUninit<T>`, which has `T`'s alignment [1].
3594 // [1] Per https://doc.rust-lang.org/1.56.0/std/mem/union.MaybeUninit.html#layout:
3596 // `MaybeUninit<T>` is guaranteed to have the same size, alignment, and
3616 // [1] Per https://doc.rust-lang.org/1.56.0/std/mem/union.MaybeUninit.html#method.assume_init:
3618 // It is up to the caller to guarantee that the `MaybeUninit<T>` really is
5610 // zeroed bytes. Since `MaybeUninit` has no validity requirements, `ptr`
7657 // padding that a typed move of `MaybeUninit<Padded>` could