Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

validate existing equality and identity semantics #88

Closed
@soc

Description

@soc

Let's avoid a design embarrassment such as rust-lang/rfcs#3535 and ensure/test that the semantics work correctly as specified in https://soc.me/languages/equality-and-identity-part3.

This means Identity compares bits, Equality offers a user-provided equality, and Hash works to facilitate patterns such as identical || equal that are commonly found in hash-based collections.

  • check and test that contains uses identical || equal
  • rename has to includes, check and test that it uses identical
  • add missing blanket impls for Identity, because the compiler does not derive them automatically right now

note: all tests should include special floating-point values (zeros, NaNs, infinities).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions