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
Description
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
usesidentical || equal
- rename
has
toincludes
, check and test that it usesidentical
- 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).