diff options
| author | SparrowLii <liyuan179@huawei.com> | 2022-07-19 17:00:51 +0800 |
|---|---|---|
| committer | SparrowLii <liyuan179@huawei.com> | 2022-07-19 17:00:51 +0800 |
| commit | e2ecb68a0eeee6db4d8f605374e656822186f8b4 (patch) | |
| tree | f08923fd41284b35705503836bf90515c79b39d6 /compiler/rustc_monomorphize/src | |
| parent | 96c2df810b0b681fee63cae11ca63844792b6190 (diff) | |
| download | rust-e2ecb68a0eeee6db4d8f605374e656822186f8b4.tar.gz rust-e2ecb68a0eeee6db4d8f605374e656822186f8b4.zip | |
use `par_for_each_in` in `par_body_owners` and `collect_crate_mono_items`
Diffstat (limited to 'compiler/rustc_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index d9fa4d65b3a..e3cfb034e40 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -180,7 +180,7 @@ //! regardless of whether it is actually needed or not. use rustc_data_structures::fx::{FxHashMap, FxHashSet}; -use rustc_data_structures::sync::{par_iter, MTLock, MTRef, ParallelIterator}; +use rustc_data_structures::sync::{par_for_each_in, MTLock, MTRef}; use rustc_hir as hir; use rustc_hir::def::DefKind; use rustc_hir::def_id::{DefId, DefIdMap, LocalDefId}; @@ -346,7 +346,7 @@ pub fn collect_crate_mono_items( let inlining_map: MTRef<'_, _> = &mut inlining_map; tcx.sess.time("monomorphization_collector_graph_walk", || { - par_iter(roots).for_each(|root| { + par_for_each_in(roots, |root| { let mut recursion_depths = DefIdMap::default(); collect_items_rec( tcx, |
