1
1
use crate :: hir;
2
- use crate :: hir:: def_id:: { DefId , DefIndex } ;
2
+ use crate :: hir:: def_id:: { DefId , LocalDefId } ;
3
3
use crate :: hir:: map:: DefPathHash ;
4
4
use crate :: hir:: map:: definitions:: Definitions ;
5
5
use crate :: ich:: { self , CachingSourceMapView , Fingerprint } ;
@@ -139,8 +139,8 @@ impl<'a> StableHashingContext<'a> {
139
139
}
140
140
141
141
#[ inline]
142
- pub fn local_def_path_hash ( & self , def_index : DefIndex ) -> DefPathHash {
143
- self . definitions . def_path_hash ( def_index )
142
+ pub fn local_def_path_hash ( & self , def_id : LocalDefId ) -> DefPathHash {
143
+ self . definitions . def_path_hash ( def_id . index )
144
144
}
145
145
146
146
#[ inline]
@@ -238,7 +238,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::HirId {
238
238
local_id,
239
239
} = * self ;
240
240
241
- hcx. local_def_path_hash ( owner. index ) . hash_stable ( hcx, hasher) ;
241
+ hcx. local_def_path_hash ( owner) . hash_stable ( hcx, hasher) ;
242
242
local_id. hash_stable ( hcx, hasher) ;
243
243
}
244
244
}
@@ -252,7 +252,7 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for hir::HirId {
252
252
fn to_stable_hash_key ( & self ,
253
253
hcx : & StableHashingContext < ' a > )
254
254
-> ( DefPathHash , hir:: ItemLocalId ) {
255
- let def_path_hash = hcx. local_def_path_hash ( self . owner . index ) ;
255
+ let def_path_hash = hcx. local_def_path_hash ( self . owner ) ;
256
256
( def_path_hash, self . local_id )
257
257
}
258
258
}
0 commit comments