@@ -240,9 +240,9 @@ impl<'hir> Map<'hir> {
240240 }
241241
242242 #[ inline]
243- pub fn local_def_id_from_hir_id ( & self , hir_id : HirId ) -> DefId {
244- self . opt_local_def_id_from_hir_id ( hir_id) . unwrap_or_else ( || {
245- bug ! ( "local_def_id_from_hir_id : no entry for `{:?}`, which has a map of `{:?}`" ,
243+ pub fn local_def_id ( & self , hir_id : HirId ) -> DefId {
244+ self . opt_local_def_id ( hir_id) . unwrap_or_else ( || {
245+ bug ! ( "local_def_id : no entry for `{:?}`, which has a map of `{:?}`" ,
246246 hir_id, self . find_entry( hir_id) )
247247 } )
248248 }
@@ -427,7 +427,7 @@ impl<'hir> Map<'hir> {
427427 }
428428
429429 pub fn body_owner_def_id ( & self , id : BodyId ) -> DefId {
430- self . local_def_id_from_hir_id ( self . body_owner ( id) )
430+ self . local_def_id ( self . body_owner ( id) )
431431 }
432432
433433 /// Given a `HirId`, returns the `BodyId` associated with it,
@@ -763,7 +763,7 @@ impl<'hir> Map<'hir> {
763763 /// Returns the `DefId` of `id`'s nearest module parent, or `id` itself if no
764764 /// module parent is in this map.
765765 pub fn get_module_parent ( & self , id : HirId ) -> DefId {
766- self . local_def_id_from_hir_id ( self . get_module_parent_node ( id) )
766+ self . local_def_id ( self . get_module_parent_node ( id) )
767767 }
768768
769769 /// Returns the `HirId` of `id`'s nearest module parent, or `id` itself if no
@@ -839,7 +839,7 @@ impl<'hir> Map<'hir> {
839839 }
840840
841841 pub fn get_parent_did ( & self , id : HirId ) -> DefId {
842- self . local_def_id_from_hir_id ( self . get_parent_item ( id) )
842+ self . local_def_id ( self . get_parent_item ( id) )
843843 }
844844
845845 pub fn get_foreign_abi ( & self , hir_id : HirId ) -> Abi {
@@ -1245,7 +1245,7 @@ fn hir_id_to_string(map: &Map<'_>, id: HirId, include_id: bool) -> String {
12451245 // the user-friendly path, otherwise fall back to stringifying DefPath.
12461246 crate :: ty:: tls:: with_opt ( |tcx| {
12471247 if let Some ( tcx) = tcx {
1248- let def_id = map. local_def_id_from_hir_id ( id) ;
1248+ let def_id = map. local_def_id ( id) ;
12491249 tcx. def_path_str ( def_id)
12501250 } else if let Some ( path) = map. def_path_from_hir_id ( id) {
12511251 path. data . into_iter ( ) . map ( |elem| {
0 commit comments