11use rustc_data_structures:: fingerprint:: Fingerprint ;
2- use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexMap } ;
2+ use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
33use rustc_data_structures:: profiling:: { EventId , QueryInvocationId , SelfProfilerRef } ;
44use rustc_data_structures:: sharded:: { self , Sharded } ;
55use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
@@ -93,7 +93,7 @@ pub struct DepGraphData<K: DepKind> {
9393 /// things available to us. If we find that they are not dirty, we
9494 /// load the path to the file storing those work-products here into
9595 /// this map. We can later look for and extract that data.
96- previous_work_products : FxIndexMap < WorkProductId , WorkProduct > ,
96+ previous_work_products : WorkProductMap ,
9797
9898 dep_node_debug : Lock < FxHashMap < DepNode < K > , String > > ,
9999
@@ -116,7 +116,7 @@ impl<K: DepKind> DepGraph<K> {
116116 pub fn new (
117117 profiler : & SelfProfilerRef ,
118118 prev_graph : SerializedDepGraph < K > ,
119- prev_work_products : FxIndexMap < WorkProductId , WorkProduct > ,
119+ prev_work_products : WorkProductMap ,
120120 encoder : FileEncoder ,
121121 record_graph : bool ,
122122 record_stats : bool ,
@@ -688,7 +688,7 @@ impl<K: DepKind> DepGraph<K> {
688688
689689 /// Access the map of work-products created during the cached run. Only
690690 /// used during saving of the dep-graph.
691- pub fn previous_work_products ( & self ) -> & FxIndexMap < WorkProductId , WorkProduct > {
691+ pub fn previous_work_products ( & self ) -> & WorkProductMap {
692692 & self . data . as_ref ( ) . unwrap ( ) . previous_work_products
693693 }
694694
@@ -1051,6 +1051,8 @@ pub struct WorkProduct {
10511051 pub saved_files : UnordMap < String , String > ,
10521052}
10531053
1054+ pub type WorkProductMap = UnordMap < WorkProductId , WorkProduct > ;
1055+
10541056// Index type for `DepNodeData`'s edges.
10551057rustc_index:: newtype_index! {
10561058 struct EdgeIndex { }
0 commit comments