Skip to content

Suggest ptr::null, ptr::null_mut over casting. #1047

Closed
@Stebalien

Description

@Stebalien

Add a lint to suggest converting all instances of:

0 as *const T;
0 as *mut T;

To:

std::ptr::null();
std::ptr::null_mut();

See rust-lang/rust#34456

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsL-styleLint: Belongs in the style lint groupT-ASTType: Requires working with the ASTgood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions