Skip to main content

any_statement

Function any_statement 

Source
pub fn any_statement(
    block: &Block,
    predicate: &mut impl FnMut(&Statement) -> bool,
) -> bool
Expand description

Returns true if predicate returns true for any statement in block, including statements nested inside Block, If, Loop and Switch statements.

Does not traverse into the bodies of the functions called by block, so callers that care about a whole module must visit every function and entry point themselves.