Skip to content

Commit 1a3dee4

Browse files
committed
Remove rustc_middle::hir::Map.
It's unused.
1 parent 7c5f226 commit 1a3dee4

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

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

-10
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ use crate::middle::debugger_visualizer::DebuggerVisualizerFile;
1818
use crate::query::LocalCrate;
1919
use crate::ty::TyCtxt;
2020

21-
// FIXME: the structure was necessary in the past but now it
22-
// only serves as "namespace" for HIR-related methods, and can be
23-
// removed if all the methods are reasonably renamed and moved to tcx
24-
// (https://github.com/rust-lang/rust/pull/118256#issuecomment-1826442834).
25-
#[allow(unused)] // FIXME: temporary
26-
#[derive(Copy, Clone)]
27-
pub struct Map<'hir> {
28-
pub(super) tcx: TyCtxt<'hir>,
29-
}
30-
3121
/// An iterator that walks up the ancestor tree of a given `HirId`.
3222
/// Constructed using `tcx.hir_parent_iter(hir_id)`.
3323
struct ParentHirIterator<'tcx> {

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

-5
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ impl ModuleItems {
116116
}
117117

118118
impl<'tcx> TyCtxt<'tcx> {
119-
#[inline(always)]
120-
pub fn hir(self) -> map::Map<'tcx> {
121-
map::Map { tcx: self }
122-
}
123-
124119
pub fn parent_module(self, id: HirId) -> LocalModDefId {
125120
if !id.is_owner() && self.def_kind(id.owner) == DefKind::Mod {
126121
LocalModDefId::new_unchecked(id.owner.def_id)

0 commit comments

Comments
 (0)