@@ -29,10 +29,8 @@ use crate::ty::subst::{GenericArg, InternalSubsts, Subst, SubstsRef};
29
29
use crate :: ty:: util:: Discr ;
30
30
use rustc_ast as ast;
31
31
use rustc_attr as attr;
32
- use rustc_data_structures:: captures:: Captures ;
33
32
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
34
33
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
35
- use rustc_data_structures:: sync:: { self , par_iter, ParallelIterator } ;
36
34
use rustc_data_structures:: tagged_ptr:: CopyTaggedPtr ;
37
35
use rustc_hir as hir;
38
36
use rustc_hir:: def:: { CtorKind , CtorOf , DefKind , Res } ;
@@ -1660,18 +1658,6 @@ impl<'tcx> TyCtxt<'tcx> {
1660
1658
self . typeck ( self . hir ( ) . body_owner_def_id ( body) )
1661
1659
}
1662
1660
1663
- /// Returns an iterator of the `DefId`s for all body-owners in this
1664
- /// crate. If you would prefer to iterate over the bodies
1665
- /// themselves, you can do `self.hir().krate().body_ids.iter()`.
1666
- pub fn body_owners ( self ) -> impl Iterator < Item = LocalDefId > + Captures < ' tcx > + ' tcx {
1667
- self . hir ( ) . krate ( ) . bodies . keys ( ) . map ( move |& body_id| self . hir ( ) . body_owner_def_id ( body_id) )
1668
- }
1669
-
1670
- pub fn par_body_owners < F : Fn ( LocalDefId ) + sync:: Sync + sync:: Send > ( self , f : F ) {
1671
- par_iter ( & self . hir ( ) . krate ( ) . bodies )
1672
- . for_each ( |( & body_id, _) | f ( self . hir ( ) . body_owner_def_id ( body_id) ) ) ;
1673
- }
1674
-
1675
1661
pub fn provided_trait_methods ( self , id : DefId ) -> impl ' tcx + Iterator < Item = & ' tcx AssocItem > {
1676
1662
self . associated_items ( id)
1677
1663
. in_definition_order ( )
0 commit comments