Remove unused Map::hir_node_by_def_id method.

This commit is contained in:
Nicholas Nethercote 2025-02-03 10:54:00 +11:00
parent 6021ba0668
commit cd1d84cdf7
2 changed files with 0 additions and 8 deletions

View file

@ -110,7 +110,6 @@ impl<'a> FnKind<'a> {
pub trait Map<'hir> {
/// Retrieves the `Node` corresponding to `id`.
fn hir_node(&self, hir_id: HirId) -> Node<'hir>;
fn hir_node_by_def_id(&self, def_id: LocalDefId) -> Node<'hir>;
fn body(&self, id: BodyId) -> &'hir Body<'hir>;
fn item(&self, id: ItemId) -> &'hir Item<'hir>;
fn trait_item(&self, id: TraitItemId) -> &'hir TraitItem<'hir>;
@ -123,9 +122,6 @@ impl<'hir> Map<'hir> for ! {
fn hir_node(&self, _: HirId) -> Node<'hir> {
unreachable!();
}
fn hir_node_by_def_id(&self, _: LocalDefId) -> Node<'hir> {
*self;
}
fn body(&self, _: BodyId) -> &'hir Body<'hir> {
unreachable!();
}

View file

@ -1019,10 +1019,6 @@ impl<'hir> intravisit::Map<'hir> for Map<'hir> {
self.tcx.hir_node(hir_id)
}
fn hir_node_by_def_id(&self, def_id: LocalDefId) -> Node<'hir> {
self.tcx.hir_node_by_def_id(def_id)
}
fn body(&self, id: BodyId) -> &'hir Body<'hir> {
(*self).body(id)
}