@@ -291,8 +291,8 @@ impl<'hir> Map<'hir> {
291
291
self . definitions . def_index_to_hir_id ( def_id. to_def_id ( ) . index )
292
292
}
293
293
294
- fn def_kind ( & self , node_id : NodeId ) -> Option < DefKind > {
295
- let node = if let Some ( node) = self . find ( node_id ) {
294
+ fn def_kind ( & self , hir_id : HirId ) -> Option < DefKind > {
295
+ let node = if let Some ( node) = self . find_by_hir_id ( hir_id ) {
296
296
node
297
297
} else {
298
298
return None
@@ -347,7 +347,7 @@ impl<'hir> Map<'hir> {
347
347
if variant_data. ctor_hir_id ( ) . is_none ( ) {
348
348
return None ;
349
349
}
350
- let ctor_of = match self . find ( self . get_parent_node ( node_id ) ) {
350
+ let ctor_of = match self . find_by_hir_id ( self . get_parent_node_by_hir_id ( hir_id ) ) {
351
351
Some ( Node :: Item ( ..) ) => def:: CtorOf :: Struct ,
352
352
Some ( Node :: Variant ( ..) ) => def:: CtorOf :: Variant ,
353
353
_ => unreachable ! ( ) ,
@@ -1400,8 +1400,8 @@ fn hir_id_to_string(map: &Map<'_>, id: HirId, include_id: bool) -> String {
1400
1400
1401
1401
pub fn provide ( providers : & mut Providers < ' _ > ) {
1402
1402
providers. def_kind = |tcx, def_id| {
1403
- if let Some ( node_id ) = tcx. hir ( ) . as_local_node_id ( def_id) {
1404
- tcx. hir ( ) . def_kind ( node_id )
1403
+ if let Some ( hir_id ) = tcx. hir ( ) . as_local_hir_id ( def_id) {
1404
+ tcx. hir ( ) . def_kind ( hir_id )
1405
1405
} else {
1406
1406
bug ! ( "calling local def_kind query provider for upstream DefId: {:?}" ,
1407
1407
def_id
0 commit comments