|
1 | 1 | use std::assert_matches::assert_matches;
|
2 |
| -use std::collections::hash_map::Entry; |
3 | 2 | use std::fmt::Debug;
|
4 | 3 | use std::hash::Hash;
|
5 | 4 | use std::marker::PhantomData;
|
6 | 5 | use std::sync::Arc;
|
7 | 6 | use std::sync::atomic::Ordering;
|
8 | 7 |
|
| 8 | +use indexmap::map::Entry; |
9 | 9 | use rustc_data_structures::fingerprint::Fingerprint;
|
10 |
| -use rustc_data_structures::fx::{FxHashMap, FxHashSet}; |
| 10 | +use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap}; |
11 | 11 | use rustc_data_structures::profiling::{QueryInvocationId, SelfProfilerRef};
|
12 | 12 | use rustc_data_structures::sharded::{self, Sharded};
|
13 | 13 | use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
@@ -1054,7 +1054,7 @@ rustc_index::newtype_index! {
|
1054 | 1054 | /// first, and `data` second.
|
1055 | 1055 | pub(super) struct CurrentDepGraph<D: Deps> {
|
1056 | 1056 | encoder: GraphEncoder<D>,
|
1057 |
| - new_node_to_index: Sharded<FxHashMap<DepNode, DepNodeIndex>>, |
| 1057 | + new_node_to_index: Sharded<FxIndexMap<DepNode, DepNodeIndex>>, |
1058 | 1058 | prev_index_to_index: Lock<IndexVec<SerializedDepNodeIndex, Option<DepNodeIndex>>>,
|
1059 | 1059 |
|
1060 | 1060 | /// This is used to verify that fingerprints do not change between the creation of a node
|
@@ -1124,7 +1124,7 @@ impl<D: Deps> CurrentDepGraph<D> {
|
1124 | 1124 | previous,
|
1125 | 1125 | ),
|
1126 | 1126 | new_node_to_index: Sharded::new(|| {
|
1127 |
| - FxHashMap::with_capacity_and_hasher( |
| 1127 | + FxIndexMap::with_capacity_and_hasher( |
1128 | 1128 | new_node_count_estimate / sharded::shards(),
|
1129 | 1129 | Default::default(),
|
1130 | 1130 | )
|
|
0 commit comments