@@ -4,9 +4,8 @@ use crate::ty::fast_reject;
44use crate :: ty:: fold:: TypeFoldable ;
55use crate :: ty:: { Ty , TyCtxt } ;
66use rustc_hir as hir;
7- use rustc_hir:: def_id:: { CrateNum , DefId } ;
7+ use rustc_hir:: def_id:: { CrateNum , DefId , LocalDefId } ;
88use rustc_hir:: definitions:: DefPathHash ;
9- use rustc_hir:: HirId ;
109
1110use rustc_data_structures:: fx:: FxHashMap ;
1211use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
@@ -201,7 +200,7 @@ impl<'tcx> TyCtxt<'tcx> {
201200pub ( super ) fn all_local_trait_impls < ' tcx > (
202201 tcx : TyCtxt < ' tcx > ,
203202 krate : CrateNum ,
204- ) -> & ' tcx BTreeMap < DefId , Vec < HirId > > {
203+ ) -> & ' tcx BTreeMap < DefId , Vec < LocalDefId > > {
205204 & tcx. hir_crate ( krate) . trait_impls
206205}
207206
@@ -229,8 +228,8 @@ pub(super) fn trait_impls_of_provider(tcx: TyCtxt<'_>, trait_id: DefId) -> Trait
229228 }
230229 }
231230
232- for & hir_id in tcx. hir ( ) . trait_impls ( trait_id) {
233- let impl_def_id = tcx . hir ( ) . local_def_id ( hir_id ) . to_def_id ( ) ;
231+ for & impl_def_id in tcx. hir ( ) . trait_impls ( trait_id) {
232+ let impl_def_id = impl_def_id . to_def_id ( ) ;
234233
235234 let impl_self_ty = tcx. type_of ( impl_def_id) ;
236235 if impl_self_ty. references_error ( ) {
0 commit comments