Expand description
Loop-context walker shared by the *-loop lints.
Visits every statement and expression that executes inside a loop of a function, following
its modifier chain through _ and inlining the internal helpers it calls (including super
dispatch, resolved against the contract the entry point belongs to).
Re-exportsยง
use crate::sol::analysis::is_builtin;๐use crate::sol::analysis::loop_stmts;๐use solar::ast::StateMutability;๐use solar::ast::Visibility;๐use solar::interface::sym;๐use solar::sema::Gcx;๐use solar::sema::hir::Block;๐use solar::sema::hir::ContractId;๐use solar::sema::hir::Expr;๐use solar::sema::hir::ExprKind;๐use solar::sema::hir::Function;๐use solar::sema::hir::FunctionId;๐use solar::sema::hir::FunctionKind;๐use solar::sema::hir::Hir;๐use solar::sema::hir::Modifier;๐use solar::sema::hir::Stmt;๐use solar::sema::hir::StmtKind;๐use solar::sema::hir::Visit;๐use solar::sema::ty::TyKind;๐use std::convert::Infallible;๐use std::ops::ControlFlow;๐
Structsยง
- Loop
Walker ๐
Enumsยง
- Loop
Item ๐ - A statement or expression reached inside a loop.
Functionsยง
- for_
each_ ๐loop_ item - Calls
ffor every statement and expression executing inside a loop offunc. Internal helpers called from a loop are inlined; withfollow_calls_outside_loop, so are helpers called outside one, so that their own loops are reported too. - for_
each_ ๐payable_ loop_ expr - Calls
ffor every expression executing inside a loop of a payable entry point, including loops in the internal helpers it calls (whether the call itself sits in a loop or not).
Type Aliasesยง
- Continuation ๐
- The rest of a modifier chain and the function body it wraps, executed at
_.