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.
[x] check and test that contains uses identical || equal
[x] rename has to includes, check and test that it uses identical
[x] 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).
Let's avoid a design embarrassment such as https://github.com/rust-lang/rfcs/pull/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, andHash
works to facilitate patterns such asidentical || equal
that are commonly found in hash-based collections.contains
usesidentical || equal
has
toincludes
, check and test that it usesidentical
Identity
, because the compiler does not derive them automatically right nownote: all tests should include special floating-point values (zeros, NaNs, infinities).