Skip to content

PartialEq example is not symmetric #53844

Closed
@RalfJung

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

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