Module visitors

Source

Modules§

internal 🔒

Macros§

visitable_ref 🔒

Enums§

Descend
Allows for controlled descent when using visitor functions. Use () instead when always descending into child nodes.

Traits§

Visitable
A type which can be visited.

Functions§

any_temporaries_need_ordered_drop
contains_break_or_continue
contains_try 🔒
returns true if expr contains match expr desugared from try
contains_unsafe_block
Checks if the given expression contains an unsafe block
find_all_ret_expressions
for_each_expr
Calls the given function once for each expression contained. This will enter bodies, but not nested items.
for_each_expr_without_closures
Calls the given function once for each expression contained. This does not enter any bodies or nested items.
for_each_local_assignment
Runs the given function for each path expression referencing the given local which occur after the given expression.
for_each_local_use_after_expr
Runs the given function for each path expression referencing the given local which occur after the given expression.
for_each_unconsumed_temporary
for_each_value_source
Runs the given function for each sub-expression producing the final value consumed by the parent of the give expression.
is_const_evaluatable
Checks if the given expression is a constant.
is_expr_unsafe
Checks if the given expression performs an unsafe operation outside of an unsafe block.
is_local_used
Checks if the given local is used.
is_res_used
Checks if the given resolved path is used in the given body.
local_used_once
If the local is only used once in visitable returns the path expression referencing the given local