is_aligned_logic

Function is_aligned_logic 

Source
pub fn is_aligned_logic<T: ?Sized>(ptr: *const T) -> bool
Expand description

Whether a pointer is aligned.

This is a logic version of <*const T>::is_aligned, but extended with an additional rule for [U]. We make use of this property in [ghost::PtrOwn] to define a more precise invariant for slice pointers.

  • For T: Sized, specializes to [is_aligned_logic_sized].
  • For T = [U], specializes to [is_aligned_logic_slice].
  • For T = str, specializes to true.

(open, inline)

dead