Remove unused opt_local_def_id_to_hir_id function

Found while investigating #82933 - all LocalDefIds are expected to have
HirIds, there's no point in pretending otherwise.
This commit is contained in:
Joshua Nelson 2021-03-14 01:37:13 -05:00
parent 5c6d3bf389
commit e161a2fd73
2 changed files with 0 additions and 10 deletions

View File

@ -342,11 +342,6 @@ impl Definitions {
self.def_id_to_hir_id[id].unwrap()
}
#[inline]
pub fn opt_local_def_id_to_hir_id(&self, id: LocalDefId) -> Option<hir::HirId> {
self.def_id_to_hir_id[id]
}
#[inline]
pub fn opt_hir_id_to_local_def_id(&self, hir_id: hir::HirId) -> Option<LocalDefId> {
self.hir_id_to_def_id.get(&hir_id).copied()

View File

@ -180,11 +180,6 @@ impl<'hir> Map<'hir> {
self.tcx.definitions.local_def_id_to_hir_id(def_id)
}
#[inline]
pub fn opt_local_def_id_to_hir_id(&self, def_id: LocalDefId) -> Option<HirId> {
self.tcx.definitions.opt_local_def_id_to_hir_id(def_id)
}
pub fn iter_local_def_id(&self) -> impl Iterator<Item = LocalDefId> + '_ {
self.tcx.definitions.iter_local_def_id()
}