Skip to content

Tracking Issue for #![feature(pointer_try_cast_aligned)] #141221

Description

@mathisbot

Feature gate: #![feature(pointer_try_cast_aligned)]

This is a tracking issue for adding the convenience method try_cast_aligned to *const T, *mut T and NonNull<T>.

impl<T: ?Sized> *const T {
    pub fn try_cast_aligned<U: Sized>(self) -> Option<*const U>;
}

impl<T: ?Sized> *mut T {
    pub fn try_cast_aligned<U: Sized>(self) -> Option<*mut U>;
}

impl<T: ?Sized> NonNull<T> {
    pub fn try_cast_aligned<U: Sized>(self) -> Option<NonNull<U>>;
}

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 RFCS-tracking-ready-to-stabilizeStatus: This is ready to stabilize; it may need a stabilization report and a PRT-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