Lines Matching full:alignment
22 // zero-sized type to have a size of 0 and an alignment of 1."
27 // - `Unaligned`: `()` has alignment 1.
43 // - Alignment is >= 1 [3]
44 // - Size is an integer multiple of alignment [4]
46 // the only possible alignment for `u8` and `i8` is 1.
56 // [3] Per https://doc.rust-lang.org/1.81.0/reference/type-layout.html#size-and-alignment:
58 // Alignment is measured in bytes, and must be at least 1.
60 // [4] Per https://doc.rust-lang.org/1.81.0/reference/type-layout.html#size-and-alignment:
62 // The size of a value is always a multiple of its alignment.
92 // - `IntoBytes`: Since "the boolean type has a size and alignment of 1 each"
97 // a size and alignment of 1 each."
207 // byte. The only valid alignment for a 1-byte type is 1.
265 // change. The only valid alignment for a 1-byte type is 1.
272 // are guaranteed to have the same size and alignment:
279 // are guaranteed to have the same size and alignment:
315 // has the same size and alignment as `T`. In some of these cases, Rust
470 // alignment cannot be smaller than 1 [2], and since its alignment
472 // alignment is 1. Thus, it is sound to implement `Unaligned`.
476 // This type has the same size, alignment, and bit validity as the
479 // [2] Per https://doc.rust-lang.org/1.81.0/reference/type-layout.html#size-and-alignment:
481 // Alignment is measured in bytes, and must be at least 1.
483 // [3] Per https://doc.rust-lang.org/1.81.0/reference/type-layout.html#size-and-alignment:
485 // The size of a value is always a multiple of its alignment.
499 // This type has the same size, alignment, and bit validity as the
504 // This type has the same size, alignment, and bit validity as the
509 // This type has the same size, alignment, and bit validity a `bool`.
649 // - `Unaligned`: Per the preceding reference, `PhantomData` has alignment 1.
672 // having the same size and alignment as `T`) with no pre- or post-padding.
682 // alignment as `T`.
707 // `MaybeUninit<T>` is guaranteed to have the same size, alignment, and ABI as
714 // same alignment as `T`.
742 // same alignment as `T`.
772 // a type of size zero and alignment 1 (which `()` is [1]). Such a
774 // (since it has a zero-sized referent), and its alignment requirement
780 // have a size of 0 and an alignment of 1.
832 // has the same alignment as `T`.
843 // thus has the same alignment as `T`.
864 A: invariant::Alignment, in is_bit_valid() argument
873 // alignment of `T`. Arrays are laid out so that the zero-based `nth` element
884 // is (respectively). Furthermore, since an array/slice has "the same alignment
917 // same alignment of `T`. Arrays are laid out so that the zero-based
1039 // pointer to a type of size zero and alignment 1 (which `()` is
1042 // and its alignment requirement (since it is aligned to 1).
1047 // type to have a size of 0 and an alignment of 1.
1106 unsafe impl<Aliasing, Alignment, $($AllT),+> crate::ProjectField<
1108 (Aliasing, Alignment, crate::invariant::Uninit),
1114 Alignment: crate::invariant::Alignment,
1123 // well-aligned, so projection preserves both the alignment and
1125 type Invariants = (Aliasing, Alignment, crate::invariant::Uninit);
1132 unsafe impl<Aliasing, Alignment, $($AllT),+> crate::ProjectField<
1134 (Aliasing, Alignment, crate::invariant::Initialized),
1140 Alignment: crate::invariant::Alignment,
1149 // well-aligned, so projection preserves both the alignment and
1151 type Invariants = (Aliasing, Alignment, crate::invariant::Initialized);
1158 unsafe impl<Aliasing, Alignment, $($AllT),+> crate::ProjectField<
1160 (Aliasing, Alignment, crate::invariant::Valid),
1166 Alignment: crate::invariant::Alignment,
1175 // well-aligned, so projection preserves both the alignment and
1177 type Invariants = (Aliasing, Alignment, crate::invariant::Valid);
1230 // size and alignment requirements of `T` are equal:
1239 // The size of `Vector` is `N * size_of::<T>()` and its alignment is an
1272 // - Since no upper bound is placed on the alignment, no SIMD type can be
1524 // the size and alignment requirements of `Self` (whereas `0` in test_impls()
1525 // may be any integer type with a different size or alignment in test_impls()
1831 // satisfy `$ty`'s alignment requirement, which isn't in test_impls()