Module rustc_typeck::hir::intravisit
[−]
[src]
rustc_private
)HIR walker for walking the contents of nodes.
For an overview of the visitor strategy, see the docs on the
super::itemlikevisit::ItemLikeVisitor
trait.
If you have decided to use this visitor, here are some general notes on how to do it:
Each overridden visit method has full control over what
happens with its node, it can do its own traversal of the node's children,
call intravisit::walk_*
to apply the default traversal algorithm, or prevent
deeper traversal by doing nothing.
When visiting the HIR, the contents of nested items are NOT visited
by default. This is different from the AST visitor, which does a deep walk.
Hence this module is called intravisit
; see the method visit_nested_item
for more details.
Note: it is an important invariant that the default visitor walks the body of a function in "execution order" (more concretely, reverse post-order with respect to the CFG implied by the AST), meaning that if AST node A may execute before AST node B, then A is visited first. The borrow checker in particular relies on this property.
Structs
IdRange |
[ Experimental ]
|
IdRangeComputingVisitor |
[ Experimental ]
|
Enums
FnKind |
[ Experimental ]
|
NestedVisitorMap |
[ Experimental ] Specifies what nested things a visitor wants to visit. The most
common choice is |
Traits
Visitor |
[ Experimental ] Each method of the Visitor trait is a hook to be potentially
overridden. Each method's default implementation recursively visits
the substructure of the input via the corresponding |
Functions
walk_arm |
[ Experimental ]
|
walk_assoc_type_binding |
[ Experimental ]
|
walk_associated_item_kind |
[ Experimental ]
|
walk_block |
[ Experimental ]
|
walk_body |
[ Experimental ]
|
walk_crate |
[ Experimental ] Walks the contents of a crate. See also |
walk_decl |
[ Experimental ]
|
walk_defaultness |
[ Experimental ]
|
walk_enum_def |
[ Experimental ]
|
walk_expr |
[ Experimental ]
|
walk_fn |
[ Experimental ]
|
walk_fn_decl |
[ Experimental ]
|
walk_fn_kind |
[ Experimental ]
|
walk_fn_ret_ty |
[ Experimental ]
|
walk_foreign_item |
[ Experimental ]
|
walk_generics |
[ Experimental ]
|
walk_impl_item |
[ Experimental ]
|
walk_impl_item_ref |
[ Experimental ]
|
walk_item |
[ Experimental ]
|
walk_lifetime |
[ Experimental ]
|
walk_lifetime_def |
[ Experimental ]
|
walk_local |
[ Experimental ]
|
walk_macro_def |
[ Experimental ]
|
walk_mod |
[ Experimental ]
|
walk_opt_name |
[ Experimental ]
|
walk_opt_sp_name |
[ Experimental ]
|
walk_pat |
[ Experimental ]
|
walk_path |
[ Experimental ]
|
walk_path_parameters |
[ Experimental ]
|
walk_path_segment |
[ Experimental ]
|
walk_poly_trait_ref |
[ Experimental ]
|
walk_qpath |
[ Experimental ]
|
walk_stmt |
[ Experimental ]
|
walk_struct_def |
[ Experimental ]
|
walk_struct_field |
[ Experimental ]
|
walk_trait_item |
[ Experimental ]
|
walk_trait_item_ref |
[ Experimental ]
|
walk_trait_ref |
[ Experimental ]
|
walk_ty |
[ Experimental ]
|
walk_ty_param_bound |
[ Experimental ]
|
walk_variant |
[ Experimental ]
|
walk_vis |
[ Experimental ]
|
walk_where_predicate |
[ Experimental ]
|