Skip to content

Introduce as_{mut,ref}_unchecked() (feature(ptr_as_ref_unchecked)) #1225

@ojeda

Description

@ojeda

Note: this issue needs to wait until we bump our minimum to Rust 1.85.0, which will happen soon.

as_{mut,ref}_unchecked() (feature(ptr_as_ref_unchecked): rust-lang/rust#122034) has been stabilized in Rust 1.95.0 (rust-lang/rust#151995), and it has been available since Rust 1.80.0 (rust-lang/rust#122492).

Introduce the unstable feature so that everyone can use it (in rust_allowed_features) and use it in a couple places at least to show it (in a second patch, and please do one conversion in the kernel crate and one outside, to show it works in both cases).


This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes (including generating the documentation if changed, running the Rust doctests if changed, etc.), to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and to add a Suggested-by: tag, and a Link: tag to this issue. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    • libRelated to the `rust/` library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions