Skip to content

Commit cd1d84c

Browse files
committed
Remove unused Map::hir_node_by_def_id method.
1 parent 6021ba0 commit cd1d84c

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

Diff for: compiler/rustc_hir/src/intravisit.rs

-4
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ impl<'a> FnKind<'a> {
110110
pub trait Map<'hir> {
111111
/// Retrieves the `Node` corresponding to `id`.
112112
fn hir_node(&self, hir_id: HirId) -> Node<'hir>;
113-
fn hir_node_by_def_id(&self, def_id: LocalDefId) -> Node<'hir>;
114113
fn body(&self, id: BodyId) -> &'hir Body<'hir>;
115114
fn item(&self, id: ItemId) -> &'hir Item<'hir>;
116115
fn trait_item(&self, id: TraitItemId) -> &'hir TraitItem<'hir>;
@@ -123,9 +122,6 @@ impl<'hir> Map<'hir> for ! {
123122
fn hir_node(&self, _: HirId) -> Node<'hir> {
124123
unreachable!();
125124
}
126-
fn hir_node_by_def_id(&self, _: LocalDefId) -> Node<'hir> {
127-
*self;
128-
}
129125
fn body(&self, _: BodyId) -> &'hir Body<'hir> {
130126
unreachable!();
131127
}

Diff for: compiler/rustc_middle/src/hir/map.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1019,10 +1019,6 @@ impl<'hir> intravisit::Map<'hir> for Map<'hir> {
10191019
self.tcx.hir_node(hir_id)
10201020
}
10211021

1022-
fn hir_node_by_def_id(&self, def_id: LocalDefId) -> Node<'hir> {
1023-
self.tcx.hir_node_by_def_id(def_id)
1024-
}
1025-
10261022
fn body(&self, id: BodyId) -> &'hir Body<'hir> {
10271023
(*self).body(id)
10281024
}

0 commit comments

Comments
 (0)