diff options
| author | Andrew Xie <ndrew.xie@gmail.com> | 2023-06-08 00:38:50 -0400 |
|---|---|---|
| committer | Andrew Xie <ndrew.xie@gmail.com> | 2023-06-08 00:38:50 -0400 |
| commit | 54d7b327e5182b97fcdb8d90bf7853ffe54364c3 (patch) | |
| tree | 0fe3d310bbd67c354f4157cfad9b7dc9ddbbc6e4 /compiler/rustc_interface/src | |
| parent | f5f638c12434e3c277fde8f4245273c2cc3c8110 (diff) | |
| download | rust-54d7b327e5182b97fcdb8d90bf7853ffe54364c3.tar.gz rust-54d7b327e5182b97fcdb8d90bf7853ffe54364c3.zip | |
Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few misc issues, added collect to UnordItems
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs index 6975fbd917a..455a8129656 100644 --- a/compiler/rustc_interface/src/queries.rs +++ b/compiler/rustc_interface/src/queries.rs @@ -194,10 +194,15 @@ impl<'tcx> Queries<'tcx> { let future_opt = self.dep_graph_future()?.steal(); let dep_graph = future_opt .and_then(|future| { - let (prev_graph, prev_work_products) = + let (prev_graph, mut prev_work_products) = sess.time("blocked_on_dep_graph_loading", || future.open().open(sess)); - let prev_work_products = - FxIndexMap::from_iter(prev_work_products.into_sorted(&(), false)); + // Convert from UnordMap to FxIndexMap by sorting + let prev_work_product_ids = + prev_work_products.items().map(|x| *x.0).into_sorted_stable_ord(); + let prev_work_products = prev_work_product_ids + .into_iter() + .map(|x| (x, prev_work_products.remove(&x).unwrap())) + .collect::<FxIndexMap<_, _>>(); rustc_incremental::build_dep_graph(sess, prev_graph, prev_work_products) }) .unwrap_or_else(DepGraph::new_disabled); |
