rustc_hir::intravisit

Trait Map

Source
pub trait Map<'hir> {
    // Required methods
    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>;
    fn impl_item(&self, id: ImplItemId) -> &'hir ImplItem<'hir>;
    fn foreign_item(&self, id: ForeignItemId) -> &'hir ForeignItem<'hir>;
}
Expand description

An abstract representation of the HIR rustc_middle::hir::map::Map.

Required Methods§

Source

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

Retrieves the Node corresponding to id.

Source

fn hir_node_by_def_id(&self, def_id: LocalDefId) -> Node<'hir>

Source

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

Source

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

Source

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

Source

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

Source

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

Implementations on Foreign Types§

Source§

impl<'hir> Map<'hir> for !

Source§

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

Source§

fn hir_node_by_def_id(&self, _: LocalDefId) -> Node<'hir>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§