@@ -13,7 +13,7 @@ use rustc_ast::Attribute;
1313use rustc_data_structures:: fingerprint:: Fingerprint ;
1414use rustc_data_structures:: fx:: FxHashMap ;
1515use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
16- use rustc_hir:: def_id:: { LocalDefId , LOCAL_CRATE } ;
16+ use rustc_hir:: def_id:: LocalDefId ;
1717use rustc_hir:: * ;
1818use rustc_index:: vec:: IndexVec ;
1919use rustc_span:: DUMMY_SP ;
@@ -123,14 +123,14 @@ pub fn provide(providers: &mut Providers) {
123123 let hir = tcx. hir ( ) ;
124124 hir. local_def_id ( hir. get_module_parent_node ( hir. local_def_id_to_hir_id ( id) ) )
125125 } ;
126- providers. hir_crate = |tcx, _ | tcx. untracked_crate ;
126+ providers. hir_crate = |tcx, ( ) | tcx. untracked_crate ;
127127 providers. index_hir = map:: index_hir;
128128 providers. crate_hash = map:: crate_hash;
129129 providers. hir_module_items = |tcx, id| & tcx. untracked_crate . modules [ & id] ;
130- providers. hir_owner = |tcx, id| tcx. index_hir ( LOCAL_CRATE ) . map [ id] . signature ;
131- providers. hir_owner_nodes = |tcx, id| tcx. index_hir ( LOCAL_CRATE ) . map [ id] . with_bodies . as_deref ( ) ;
130+ providers. hir_owner = |tcx, id| tcx. index_hir ( ( ) ) . map [ id] . signature ;
131+ providers. hir_owner_nodes = |tcx, id| tcx. index_hir ( ( ) ) . map [ id] . with_bodies . as_deref ( ) ;
132132 providers. hir_owner_parent = |tcx, id| {
133- let index = tcx. index_hir ( LOCAL_CRATE ) ;
133+ let index = tcx. index_hir ( ( ) ) ;
134134 index. parenting . get ( & id) . copied ( ) . unwrap_or ( CRATE_HIR_ID )
135135 } ;
136136 providers. hir_attrs = |tcx, id| AttributeMap { map : & tcx. untracked_crate . attrs , prefix : id } ;
@@ -151,4 +151,5 @@ pub fn provide(providers: &mut Providers) {
151151 }
152152 } ;
153153 providers. opt_def_kind = |tcx, def_id| tcx. hir ( ) . opt_def_kind ( def_id. expect_local ( ) ) ;
154+ providers. all_local_trait_impls = |tcx, ( ) | & tcx. hir_crate ( ( ) ) . trait_impls ;
154155}
0 commit comments