Add StableOrd trait as proposed in MCP 533.
The StableOrd trait can be used to mark types as having a stable sort order across compilation sessions. Collections that sort their items in a stable way can safely implement HashStable by hashing items in sort order.
This commit is contained in:
@@ -140,7 +140,7 @@ impl stable_hasher::StableHasherResult for Fingerprint {
|
||||
}
|
||||
}
|
||||
|
||||
impl_stable_hash_via_hash!(Fingerprint);
|
||||
impl_stable_ord_and_stable_hash_via_hash!(Fingerprint);
|
||||
|
||||
impl<E: Encoder> Encodable<E> for Fingerprint {
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user