Skip to content

PartialEq example is not symmetric #53844

Description

@RalfJung

With #51760 landed, the PartialEq documentation now at the same time states

Formally, the equality must be (for all a, b and c):

  • symmetric: a == b implies b == a; and
  • [...]

And gives an example that is not symmetric: b1 == BookFormat::Paperback typechecks, but BookFormat::Paperback == b1 does not.

Cc @gnzlbg @GuillaumeGomez @steveklabnik

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsP-mediumMedium priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions