Lines Matching full:alignment
48 /// - `ptr` conforms to the alignment invariant of
49 /// [`I::Alignment`](invariant::Alignment).
66 /// 1. `ptr` conforms to the alignment invariant of
67 /// [`I::Alignment`](invariant::Alignment).
88 /// 1. `ptr` conforms to the alignment invariant of
89 /// [`I::Alignment`](invariant::Alignment).
121 /// - Alignment is a property of the referent type (`T`) and the address,
183 // 1. `ptr`, by invariant on `&'a T`, conforms to the alignment in from_ref()
210 // 1. `ptr`, by invariant on `&'a mut T`, conforms to the alignment in from_mut()
227 I: Invariants<Alignment = Aligned, Validity = Valid>,
253 // on `Ptr`, because the `I::Alignment` is `Aligned`. in as_ref()
301 // 1. `ptr` conforms to the alignment invariant of in reborrow()
302 // [`I::Alignment`](invariant::Alignment). in reborrow()
340 pub fn reborrow_shared<'b>(&'b mut self) -> Ptr<'b, T, (Shared, I::Alignment, I::Validity)> in reborrow_shared() argument
347 // 1. `ptr` conforms to the alignment invariant of in reborrow_shared()
348 // [`I::Alignment`](invariant::Alignment). in reborrow_shared()
472 pub fn recall_validity<V, R>(self) -> Ptr<'a, T, (I::Aliasing, I::Alignment, V)> in recall_validity() argument
479 // Therefore, if `self` satisfies `I::Alignment`, then so does in recall_validity()
481 unsafe { ptr.assume_alignment::<I::Alignment>() } in recall_validity()
543 // 1. `ptr` trivially satisfies the alignment invariant `Unaligned`. in project_transmute_unchecked()
603 <I::Alignment as Alignment>::read(self) in read()
650 H: Invariants<Aliasing = I::Aliasing, Alignment = I::Alignment, Validity = I::Validity>, in unify_invariants() argument
664 /// The caller promises that `self`'s referent conforms to the alignment
667 pub(crate) unsafe fn assume_alignment<A: Alignment>( in assume_alignment()
675 /// Checks the `self`'s alignment at runtime, returning an aligned `Ptr`
690 // SAFETY: We just checked the alignment. in try_into_aligned()
704 // non-trivial alignment requirement. in bikeshed_recall_aligned()
719 ) -> Ptr<'a, T, (I::Aliasing, I::Alignment, V)> { in assume_validity() argument
735 ) -> Ptr<'a, T, (I::Aliasing, I::Alignment, Initialized)> { in assume_initialized() argument
749 pub unsafe fn assume_valid(self) -> Ptr<'a, T, (I::Aliasing, I::Alignment, Valid)> { in assume_valid() argument
770 ) -> Result<Ptr<'a, T, (I::Aliasing, I::Alignment, Valid)>, ValidityError<Self, T>> in try_into_valid() argument
919 // pointer has the same alignment as `ptr`. in project_tag()
1042 // 1. By the above lemma, `slice` conforms to the alignment in as_slice()
1043 // invariant of `I::Alignment` because `self` does. in as_slice()
1053 // same alignment of `T`. Arrays are laid out so that the in as_slice()
1069 /// For caller convenience, these methods are generic over alignment
1071 /// alignment of `[u8]` is 1.
1134 // 1. `ptr` conforms to the alignment invariant of `Aligned` because in try_cast_into()
1148 // 1. `[u8]` has no alignment requirement. in try_cast_into()
1246 // SAFETY: `UnsafeCell<T>` has the same alignment as `T` [1], in get_mut()
1255 let ptr = unsafe { ptr.assume_alignment::<I::Alignment>() }; in get_mut()
1285 // `I::Alignment`. If `elem` is projected from data well-aligned in iter()