Skip to content

Tracking Issue for pointer_is_aligned_for #140980

Closed as not planned
Closed as not planned
@mathisbot

Description

@mathisbot

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

Unresolved Questions

None yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions