@@ -4,9 +4,8 @@ use crate::ty::fast_reject;
4
4
use crate :: ty:: fold:: TypeFoldable ;
5
5
use crate :: ty:: { Ty , TyCtxt } ;
6
6
use rustc_hir as hir;
7
- use rustc_hir:: def_id:: { CrateNum , DefId } ;
7
+ use rustc_hir:: def_id:: { CrateNum , DefId , LocalDefId } ;
8
8
use rustc_hir:: definitions:: DefPathHash ;
9
- use rustc_hir:: HirId ;
10
9
11
10
use rustc_data_structures:: fx:: FxHashMap ;
12
11
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
@@ -201,7 +200,7 @@ impl<'tcx> TyCtxt<'tcx> {
201
200
pub ( super ) fn all_local_trait_impls < ' tcx > (
202
201
tcx : TyCtxt < ' tcx > ,
203
202
krate : CrateNum ,
204
- ) -> & ' tcx BTreeMap < DefId , Vec < HirId > > {
203
+ ) -> & ' tcx BTreeMap < DefId , Vec < LocalDefId > > {
205
204
& tcx. hir_crate ( krate) . trait_impls
206
205
}
207
206
@@ -229,8 +228,8 @@ pub(super) fn trait_impls_of_provider(tcx: TyCtxt<'_>, trait_id: DefId) -> Trait
229
228
}
230
229
}
231
230
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 ( ) ;
234
233
235
234
let impl_self_ty = tcx. type_of ( impl_def_id) ;
236
235
if impl_self_ty. references_error ( ) {
0 commit comments