|
1 | 1 | use crate::hir::Owner; |
2 | 2 | use crate::ty::{DefIdTree, TyCtxt}; |
3 | 3 | use rustc_ast as ast; |
4 | | -use rustc_data_structures::sync::{par_for_each_in, Send, Sync}; |
| 4 | +use rustc_data_structures::sync::{par_for_each_in, par_iter, ParallelIterator, Send, Sync}; |
5 | 5 | use rustc_hir::def::{DefKind, Res}; |
6 | 6 | use rustc_hir::def_id::{DefId, LocalDefId, CRATE_DEF_ID}; |
7 | 7 | use rustc_hir::definitions::{DefKey, DefPath, DefPathHash}; |
@@ -510,10 +510,6 @@ impl<'hir> Map<'hir> { |
510 | 510 | } |
511 | 511 |
|
512 | 512 | pub fn par_body_owners<F: Fn(LocalDefId) + Sync + Send>(self, f: F) { |
513 | | - use rustc_data_structures::sync::{par_iter, ParallelIterator}; |
514 | | - #[cfg(parallel_compiler)] |
515 | | - use rustc_rayon::iter::IndexedParallelIterator; |
516 | | - |
517 | 513 | par_iter(&*self.krate().owners).for_each(|&owner| { |
518 | 514 | let owner_info = self.tcx.lower_to_hir(owner).unwrap(); |
519 | 515 | par_iter(owner_info.nodes.bodies.range(..)).for_each(|(local_id, _)| { |
@@ -666,7 +662,6 @@ impl<'hir> Map<'hir> { |
666 | 662 |
|
667 | 663 | #[cfg(parallel_compiler)] |
668 | 664 | pub fn par_for_each_module(self, f: impl Fn(LocalDefId) + Sync) { |
669 | | - use rustc_data_structures::sync::{par_iter, ParallelIterator}; |
670 | 665 | par_iter_submodules(self.tcx, CRATE_DEF_ID, &f); |
671 | 666 |
|
672 | 667 | fn par_iter_submodules<F>(tcx: TyCtxt<'_>, module: LocalDefId, f: &F) |
|
0 commit comments