[−][src]Struct rustc_middle::hir::map::collector::NodeCollector

pub(in hir::map) struct NodeCollector<'a, 'hir> {
    arena: &'hir Arena<'hir>,
    krate: &'hir Crate<'hir>,
    source_map: &'a SourceMap,
    map: IndexVec<LocalDefId, HirOwnerData<'hir>>,
    parent_node: HirId,
    current_dep_node_owner: LocalDefId,
    definitions: &'a Definitions,
    hcx: StableHashingContext<'a>,
    hir_body_nodes: Vec<(DefPathHash, Fingerprint)>,
}

A visitor that walks over the HIR and collects Nodes into a HIR map.

Fields

arena: &'hir Arena<'hir>krate: &'hir Crate<'hir>

The crate

source_map: &'a SourceMap

Source map

map: IndexVec<LocalDefId, HirOwnerData<'hir>>parent_node: HirId

The parent of this node

current_dep_node_owner: LocalDefIddefinitions: &'a Definitionshcx: StableHashingContext<'a>hir_body_nodes: Vec<(DefPathHash, Fingerprint)>

Implementations

impl<'a, 'hir> NodeCollector<'a, 'hir>[src]

pub(in hir::map) fn root(
    sess: &'a Session,
    arena: &'hir Arena<'hir>,
    krate: &'hir Crate<'hir>,
    definitions: &'a Definitions,
    hcx: StableHashingContext<'a>
) -> NodeCollector<'a, 'hir>
[src]

pub(in hir::map) fn finalize_and_compute_crate_hash(
    self,
    crate_disambiguator: CrateDisambiguator,
    cstore: &dyn CrateStore,
    commandline_args_hash: u64
) -> (IndexVec<LocalDefId, HirOwnerData<'hir>>, Svh)
[src]

pub(in hir::map::collector) fn insert_entry(
    &mut self,
    id: HirId,
    entry: Entry<'hir>,
    hash: Fingerprint
)
[src]

pub(in hir::map::collector) fn insert(
    &mut self,
    span: Span,
    hir_id: HirId,
    node: Node<'hir>
)
[src]

pub(in hir::map::collector) fn insert_with_hash(
    &mut self,
    span: Span,
    hir_id: HirId,
    node: Node<'hir>,
    hash: Fingerprint
)
[src]

pub(in hir::map::collector) fn with_parent<F: FnOnce(&mut Self)>(
    &mut self,
    parent_node_id: HirId,
    f: F
)
[src]

pub(in hir::map::collector) fn with_dep_node_owner<T: for<'b> HashStable<StableHashingContext<'b>>, F: FnOnce(&mut Self, Fingerprint)>(
    &mut self,
    dep_node_owner: LocalDefId,
    item_like: &T,
    f: F
)
[src]

Trait Implementations

impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir>[src]

type Map = Map<'hir>

pub fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map>[src]

Because we want to track parent items and so forth, enable deep walking so that we walk nested items in the context of their outer items.

Auto Trait Implementations

impl<'a, 'hir> !RefUnwindSafe for NodeCollector<'a, 'hir>

impl<'a, 'hir> !Send for NodeCollector<'a, 'hir>

impl<'a, 'hir> !Sync for NodeCollector<'a, 'hir>

impl<'a, 'hir> Unpin for NodeCollector<'a, 'hir>

impl<'a, 'hir> !UnwindSafe for NodeCollector<'a, 'hir>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]