Struct rustc_typeck::hir::intravisit::IdRangeComputingVisitor
[−]
[src]
pub struct IdRangeComputingVisitor<'a, 'hir> where 'hir: 'a { /* fields omitted */ }
rustc_private
)Methods
impl<'a, 'hir> IdRangeComputingVisitor<'a, 'hir>
[src]
fn new(map: &'a Map<'hir>) -> IdRangeComputingVisitor<'a, 'hir>
rustc_private
)fn result(&self) -> IdRange
rustc_private
)Trait Implementations
impl<'a, 'hir> Visitor<'hir> for IdRangeComputingVisitor<'a, 'hir>
[src]
fn nested_visit_map(&'this mut self) -> NestedVisitorMap<'this, 'hir>
rustc_private
)The default versions of the visit_nested_XXX
routines invoke this method to get a map to use. By selecting an enum variant, you control which kinds of nested HIR are visited; see NestedVisitorMap
for details. By "nested HIR", we are referring to bits of HIR that are not directly embedded within one another but rather indirectly, through a table in the crate. This is done to control dependencies during incremental compilation: the non-inline bits of HIR can be tracked and hashed separately. Read more
fn visit_id(&mut self, id: NodeId)
rustc_private
)fn visit_nested_item(&mut self, id: ItemId)
rustc_private
)Invoked when a nested item is encountered. By default does nothing unless you override nested_visit_map
to return Some(_)
, in which case it will walk the item. You probably don't want to override this method -- instead, override nested_visit_map
or use the "shallow" or "deep" visit patterns described on itemlikevisit::ItemLikeVisitor
. The only reason to override this method is if you want a nested pattern but cannot supply a Map
; see nested_visit_map
for advice. Read more
fn visit_nested_trait_item(&mut self, id: TraitItemId)
rustc_private
)Like visit_nested_item()
, but for trait items. See visit_nested_item()
for advice on when to override this method. Read more
fn visit_nested_impl_item(&mut self, id: ImplItemId)
rustc_private
)Like visit_nested_item()
, but for impl items. See visit_nested_item()
for advice on when to override this method. Read more
fn visit_nested_body(&mut self, id: BodyId)
rustc_private
)Invoked to visit the body of a function, method or closure. Like visit_nested_item, does nothing by default unless you override nested_visit_map
to return Some(_)
, in which case it will walk the body. Read more
fn visit_item(&mut self, i: &'v Item)
rustc_private
)Visit the top-level item and (optionally) nested items / impl items. See visit_nested_item
for details. Read more
fn visit_body(&mut self, b: &'v Body)
rustc_private
)fn as_deep_visitor(&'s mut self) -> DeepVisitor<'s, Self>
rustc_private
)When invoking visit_all_item_likes()
, you need to supply an item-like visitor. This method converts a "intra-visit" visitor into an item-like visitor that walks the entire tree. If you use this, you probably don't want to process the contents of nested item-like things, since the outer loop will visit them as well. Read more
fn visit_def_mention(&mut self, _def: Def)
rustc_private
)fn visit_name(&mut self, _span: Span, _name: Symbol)
rustc_private
)fn visit_mod(&mut self, m: &'v Mod, _s: Span, n: NodeId)
rustc_private
)fn visit_foreign_item(&mut self, i: &'v ForeignItem)
rustc_private
)fn visit_local(&mut self, l: &'v Local)
rustc_private
)fn visit_block(&mut self, b: &'v Block)
rustc_private
)fn visit_stmt(&mut self, s: &'v Spanned<Stmt_>)
rustc_private
)fn visit_arm(&mut self, a: &'v Arm)
rustc_private
)fn visit_pat(&mut self, p: &'v Pat)
rustc_private
)fn visit_decl(&mut self, d: &'v Spanned<Decl_>)
rustc_private
)fn visit_expr(&mut self, ex: &'v Expr)
rustc_private
)fn visit_ty(&mut self, t: &'v Ty)
rustc_private
)fn visit_generics(&mut self, g: &'v Generics)
rustc_private
)fn visit_where_predicate(&mut self, predicate: &'v WherePredicate)
rustc_private
)fn visit_fn_decl(&mut self, fd: &'v FnDecl)
rustc_private
)fn visit_fn(&mut self,
fk: FnKind<'v>,
fd: &'v FnDecl,
b: BodyId,
s: Span,
id: NodeId)
fk: FnKind<'v>,
fd: &'v FnDecl,
b: BodyId,
s: Span,
id: NodeId)
rustc_private
)fn visit_trait_item(&mut self, ti: &'v TraitItem)
rustc_private
)fn visit_trait_item_ref(&mut self, ii: &'v TraitItemRef)
rustc_private
)fn visit_impl_item(&mut self, ii: &'v ImplItem)
rustc_private
)fn visit_impl_item_ref(&mut self, ii: &'v ImplItemRef)
rustc_private
)fn visit_trait_ref(&mut self, t: &'v TraitRef)
rustc_private
)fn visit_ty_param_bound(&mut self, bounds: &'v TyParamBound)
rustc_private
)fn visit_poly_trait_ref(&mut self, t: &'v PolyTraitRef, m: TraitBoundModifier)
rustc_private
)fn visit_variant_data(&mut self,
s: &'v VariantData,
Symbol,
&'v Generics,
_parent_id: NodeId,
Span)
s: &'v VariantData,
Symbol,
&'v Generics,
_parent_id: NodeId,
Span)
rustc_private
)fn visit_struct_field(&mut self, s: &'v StructField)
rustc_private
)fn visit_enum_def(&mut self,
enum_definition: &'v EnumDef,
generics: &'v Generics,
item_id: NodeId,
Span)
enum_definition: &'v EnumDef,
generics: &'v Generics,
item_id: NodeId,
Span)
rustc_private
)fn visit_variant(&mut self,
v: &'v Spanned<Variant_>,
g: &'v Generics,
item_id: NodeId)
v: &'v Spanned<Variant_>,
g: &'v Generics,
item_id: NodeId)
rustc_private
)fn visit_lifetime(&mut self, lifetime: &'v Lifetime)
rustc_private
)fn visit_lifetime_def(&mut self, lifetime: &'v LifetimeDef)
rustc_private
)fn visit_qpath(&mut self, qpath: &'v QPath, id: NodeId, span: Span)
rustc_private
)fn visit_path(&mut self, path: &'v Path, _id: NodeId)
rustc_private
)fn visit_path_segment(&mut self, path_span: Span, path_segment: &'v PathSegment)
rustc_private
)fn visit_path_parameters(&mut self,
path_span: Span,
path_parameters: &'v PathParameters)
path_span: Span,
path_parameters: &'v PathParameters)
rustc_private
)fn visit_assoc_type_binding(&mut self, type_binding: &'v TypeBinding)
rustc_private
)fn visit_attribute(&mut self, _attr: &'v Attribute)
rustc_private
)fn visit_macro_def(&mut self, macro_def: &'v MacroDef)
rustc_private
)fn visit_vis(&mut self, vis: &'v Visibility)
rustc_private
)fn visit_associated_item_kind(&mut self, kind: &'v AssociatedItemKind)
rustc_private
)fn visit_defaultness(&mut self, defaultness: &'v Defaultness)
rustc_private
)