SessionDiagnostic: Fix non-determinism in generated format string. by jumbatm · Pull Request #76515 · rust-lang/rust (original) (raw)
From #76496 (comment):
So the fix is twofold: First change all the
HashSet
andHashMap
toFxHashSet
andFxHashMap
where possible, and second, collect to aVec
and sort thatVec
before iterating over the set/map
rustc_macros
can't depend on rustc_data_structures
for FxHash*
because it depends a circular dependency. Instead, I've switched to a BTreeSet so the iteration order is deterministic.
@jgalenson -- I know it's a bit of an ask, but can you confirm this fixes the problem?