Trait rustc_hir::intravisit::Map

source ·
pub trait Map<'hir> {
    // Required methods
    fn find(&self, hir_id: HirId) -> Option<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 find(&self, hir_id: HirId) -> Option<Node<'hir>>

Retrieves the Node corresponding to id, returning None if cannot be found.

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 find(&self, _: HirId) -> Option<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§