@@ -4,15 +4,15 @@ pub use self::definitions::{
44} ;
55
66use crate :: arena:: Arena ;
7- use crate :: dep_graph:: { DepGraph , DepKind , DepNode , DepNodeIndex } ;
7+ use crate :: dep_graph:: { DepGraph , DepNodeIndex } ;
88use crate :: hir:: { HirOwner , HirOwnerItems } ;
99use crate :: middle:: cstore:: CrateStoreDyn ;
1010use crate :: ty:: query:: Providers ;
1111use crate :: ty:: TyCtxt ;
1212use rustc_data_structures:: fx:: FxHashMap ;
1313use rustc_data_structures:: svh:: Svh ;
1414use rustc_hir:: def:: { DefKind , Res } ;
15- use rustc_hir:: def_id:: { DefId , DefIndex , LocalDefId } ;
15+ use rustc_hir:: def_id:: { DefId , DefIndex , LocalDefId , LOCAL_CRATE } ;
1616use rustc_hir:: intravisit;
1717use rustc_hir:: itemlikevisit:: ItemLikeVisitor ;
1818use rustc_hir:: print:: Nested ;
@@ -537,11 +537,7 @@ impl<'hir> Map<'hir> {
537537 }
538538
539539 pub fn trait_impls ( & self , trait_did : DefId ) -> & ' hir [ HirId ] {
540- self . dep_graph . read ( DepNode :: new_no_params ( DepKind :: AllLocalTraitImpls ) ) ;
541-
542- // N.B., intentionally bypass `self.krate()` so that we
543- // do not trigger a read of the whole krate here
544- self . krate . trait_impls . get ( & trait_did) . map_or ( & [ ] , |xs| & xs[ ..] )
540+ self . tcx . all_local_trait_impls ( LOCAL_CRATE ) . get ( & trait_did) . map_or ( & [ ] , |xs| & xs[ ..] )
545541 }
546542
547543 /// Gets the attributes on the crate. This is preferable to
0 commit comments