Closed as not planned
Description
Feature gate: #![feature(pointer_is_aligned_for)]
This is a tracking issue for adding the convenience method is_aligned_for
to *const T
, *mut T
and NonNull<T>
.
impl<T: ?Sized> *const T {
#[must_use]
#[inline]
pub fn is_aligned_for<U: Sized>(self) -> bool;
}
impl<T: ?Sized> *mut T {
#[must_use]
#[inline]
pub fn is_aligned_for<U: Sized>(self) -> bool;
}
impl<T: ?Sized> NonNull<T> {
#[must_use]
#[inline]
pub fn is_aligned_for<U: Sized>(self) -> bool;
}
Steps / History
- API change proposal (ACP): ACP:
ptr::is_aligned_for::<U>
libs-team#588 - Implementation: Implement
ptr::is_aligned_for
andNonNull::is_aligned_for
. #140982 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
None yet.