Skip to content

Add lint converting reference to pointer cast into ptr::from_{ref,mut} method calls #10130

Closed
@SUPERCILEX

Description

@SUPERCILEX

What it does

&something as *const Something would be converted to ptr::from_ref(&something)

See the tracking issue: rust-lang/rust#106116

Once those methods are stabilized, we should be able to re-open #9802 and finally ban all as casts for pointers.

Lint Name

as_ptr_cast

Category

style, pedantic

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions