Trait HirTyCtxt

Source
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).

Required Methods§

Source

fn hir_node(&self, hir_id: HirId) -> Node<'hir>

Retrieves the Node corresponding to id.

Source

fn hir_body(&self, id: BodyId) -> &'hir Body<'hir>

Source

fn hir_item(&self, id: ItemId) -> &'hir Item<'hir>

Source

fn hir_trait_item(&self, id: TraitItemId) -> &'hir TraitItem<'hir>

Source

fn hir_impl_item(&self, id: ImplItemId) -> &'hir ImplItem<'hir>

Source

fn hir_foreign_item(&self, id: ForeignItemId) -> &'hir ForeignItem<'hir>

Implementations on Foreign Types§

Source§

impl<'hir> HirTyCtxt<'hir> for !

Source§

fn hir_node(&self, _: HirId) -> Node<'hir>

Source§

fn hir_body(&self, _: BodyId) -> &'hir Body<'hir>

Source§

fn hir_item(&self, _: ItemId) -> &'hir Item<'hir>

Source§

fn hir_trait_item(&self, _: TraitItemId) -> &'hir TraitItem<'hir>

Source§

fn hir_impl_item(&self, _: ImplItemId) -> &'hir ImplItem<'hir>

Source§

fn hir_foreign_item(&self, _: ForeignItemId) -> &'hir ForeignItem<'hir>

Implementors§