Skip to content

Add lint for u8 as *mut cast #42915

Open
Open
@mattico

Description

@mattico

This is an easy error to make: #42901 #42827

A cast from u8 to a pointer is probably always an error. In the rare case that you're creating a pointer into the first 256 bytes of address space, u8 as usize as *mut is more clear, or you can be troubled to #[allow(u8_to_ptr)].

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions