Remove PartialOrd
/Ord
impls for DefId
and CrateNum
#83006
Labels
A-incr-comp
Area: Incremental compilation
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Both
DefId
andCrateNum
are not stable across compilation sessions - the associatedDefPathHash
is a stable cross-session ID. However, bothDefId
andCrateNum
haveOrd
impls, which makes it easy to accidentally sort something by the unstableDefID
/CrateNum
value. If this sorted result makes its way into a query result, it can lead to unstable hash values across compilation sessions. See #82920 for an example of this occuring.My initial attempt to remove these impls encountered a large number of usages across multiple crates.
The text was updated successfully, but these errors were encountered: