Skip to content

Derived PartialOrd and implemented Ord #1621

Closed
@ghost

Description

Suggestion: if a user writes #[derive(PartialOrd)] and then implements Ord manually, we should issue a warning. This is almost certainly wrong and will lead to problems.

The same applies to PartialEq and Eq.

See rust-lang/rust#40192 for an example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    L-correctnessLint: Belongs in the correctness lint groupL-unnecessaryLint: Warn about unnecessary codeT-middleType: Probably requires verifiying typesgood 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