@@ -29,10 +29,8 @@ use crate::ty::subst::{GenericArg, InternalSubsts, Subst, SubstsRef};
2929use crate :: ty:: util:: Discr ;
3030use rustc_ast as ast;
3131use rustc_attr as attr;
32- use rustc_data_structures:: captures:: Captures ;
3332use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
3433use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
35- use rustc_data_structures:: sync:: { self , par_iter, ParallelIterator } ;
3634use rustc_data_structures:: tagged_ptr:: CopyTaggedPtr ;
3735use rustc_hir as hir;
3836use rustc_hir:: def:: { CtorKind , CtorOf , DefKind , Res } ;
@@ -1660,18 +1658,6 @@ impl<'tcx> TyCtxt<'tcx> {
16601658 self . typeck ( self . hir ( ) . body_owner_def_id ( body) )
16611659 }
16621660
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-
16751661 pub fn provided_trait_methods ( self , id : DefId ) -> impl ' tcx + Iterator < Item = & ' tcx AssocItem > {
16761662 self . associated_items ( id)
16771663 . in_definition_order ( )
0 commit comments