File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ use crate::visit_lib::RustdocEffectiveVisibilities;
2828/// to be a fairly large and expensive structure to clone. Instead this adheres
2929/// to `Send` so it may be stored in an `Arc` instance and shared among the various
3030/// rendering threads.
31+ ///
32+ /// To promote reproducibility across operating systems, this structure
33+ /// intentionally does not use [`rustc_data_structures::fx::FxHashMap`].
34+ /// Elements can be stored in different orders in an `FxHashMap`, even if the
35+ /// elements are inserted in the same order. Wherever an `FxHashMap` would be
36+ /// needed, an [`rustc_data_structures::fx::FxIndexMap`] is used instead.
3137#[ derive( Default ) ]
3238pub ( crate ) struct Cache {
3339 /// Maps a type ID to all known implementations for that type. This is only
@@ -47,7 +53,7 @@ pub(crate) struct Cache {
4753
4854 /// Similar to `paths`, but only holds external paths. This is only used for
4955 /// generating explicit hyperlinks to other crates.
50- pub ( crate ) external_paths : FxHashMap < DefId , ( Vec < Symbol > , ItemType ) > ,
56+ pub ( crate ) external_paths : FxIndexMap < DefId , ( Vec < Symbol > , ItemType ) > ,
5157
5258 /// Maps local `DefId`s of exported types to fully qualified paths.
5359 /// Unlike 'paths', this mapping ignores any renames that occur
You can’t perform that action at this time.
0 commit comments