mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
739e5ef49e
StableCompare is a companion trait to `StableOrd`. Some types like `Symbol` can be compared in a cross-session stable way, but their `Ord` implementation is not stable. In such cases, a `StableOrd` implementation can be provided to offer a lightweight way for stable sorting. (The more heavyweight option is to sort via `ToStableHashKey`, but then sorting needs to have access to a stable hashing context and `ToStableHashKey` can also be expensive as in the case of `Symbol` where it has to allocate a `String`.) |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |