Skip to content

Uplift clippy::mem_discriminant_non_enum into rustc #83899

Closed
@Flying-Toast

Description

@Flying-Toast

The clippy::mem_discriminant_non_enum lint seems like it should be directly in rustc. The lint prevents doing something like:

core::mem::discriminant::<i32>(&4)

which causes unspecified behavior.

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.T-langRelevant to the language 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