Implement obligation checking for the Eq ability

Every type can have `Eq.isEq` derived for it, as long as

- it does not transitively contain a function
- it does not transitively contain a floating point value
- it does not transitively contain an opaque type that does not support
  `Eq`
This commit is contained in:
Ayaz Hafiz 2022-10-05 15:07:27 -05:00
parent 5931dd5fc2
commit b587bcf0c2
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
5 changed files with 437 additions and 81 deletions

View file

@ -51,6 +51,7 @@ pub const DERIVABLE_ABILITIES: &[(Symbol, &[Symbol])] = &[
(Symbol::ENCODE_ENCODING, &[Symbol::ENCODE_TO_ENCODER]),
(Symbol::DECODE_DECODING, &[Symbol::DECODE_DECODER]),
(Symbol::HASH_HASH_ABILITY, &[Symbol::HASH_HASH]),
(Symbol::EQ_EQ, &[Symbol::EQ_IS_EQ]),
];
/// In Debug builds only, Symbol has a name() method that lets