pub trait HirTyCtxt<'hir> {
// Required methods
fn hir_node(&self, hir_id: HirId) -> Node<'hir>;
fn hir_body(&self, id: BodyId) -> &'hir Body<'hir>;
fn hir_item(&self, id: ItemId) -> &'hir Item<'hir>;
fn hir_trait_item(&self, id: TraitItemId) -> &'hir TraitItem<'hir>;
fn hir_impl_item(&self, id: ImplItemId) -> &'hir ImplItem<'hir>;
fn hir_foreign_item(&self, id: ForeignItemId) -> &'hir ForeignItem<'hir>;
}
Expand description
HIR things retrievable from TyCtxt
, avoiding an explicit dependence on
TyCtxt
. The only impls are for !
(where these functions are never
called) and TyCtxt
(in rustc_middle
).