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_middle/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_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/hir/map/mod.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/hir/map/mod.rs b/compiler/rustc_middle/src/hir/map/mod.rs index 3a59b2069b3..0001e1aa53e 100644 --- a/compiler/rustc_middle/src/hir/map/mod.rs +++ b/compiler/rustc_middle/src/hir/map/mod.rs @@ -491,9 +491,7 @@ impl<'hir> Map<'hir> { } pub fn par_body_owners<F: Fn(LocalDefId) + Sync + Send>(self, f: F) { - use rustc_data_structures::sync::{par_iter, ParallelIterator}; - - par_iter(&self.tcx.hir_crate_items(()).body_owners[..]).for_each(|&def_id| f(def_id)); + par_for_each_in(&self.tcx.hir_crate_items(()).body_owners[..], |&def_id| f(def_id)); } pub fn ty_param_owner(self, def_id: LocalDefId) -> LocalDefId { |
