Tracking Issue for pointer_is_aligned_to (original) (raw)
Feature gate: #![feature(pointer_is_aligned)]
Feature gate: #![feature(pointer_is_aligned_to)]
This is a tracking issue for ptr.is_aligned() andptr.is_aligned_to(alignment).
impl *const T {
// feature gate pointer_is_aligned was stabilized
// pub fn is_aligned(self) -> bool where T: Sized;
// feature gate pointer_is_aligned_to
pub fn is_aligned_to(self, align: usize) -> bool;
}
// ... and the same for *mut T
impl <T: ?Sized> NonNull { pub const fn is_aligned_to(self, align: usize) -> bool; }