Skip to content

Lints to suggest deriving more traits #1781

@clarfonthey

Description

@clarfonthey

A few suggestions:

  1. If a type derives Eq, it should also derive Hash.
  2. If a type is trivial (e.g. a unit struct or an enum of only unit variants) we should suggest to implement Copy, Eq, Default, Hash, and their dependencies.
  3. If a type derives PartialEq but could also derive Eq, suggest deriving Eq.
  4. Similar to 3 but with Ord.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.T-middleType: Probably requires verifiying types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions