Skip to main content Module unwrapped_modifier_logic Copy item path Source use super::UnwrappedModifierLogic ; ๐ use crate::linter::LateLintPass ; ๐ use crate::linter::LintContext ; ๐ use crate::linter::Suggestion ; ๐ use crate::sol::Severity ; ๐ use crate::sol::SolLint ; ๐ use crate::sol::analysis::block_outcome ; ๐ use crate::sol::analysis::count_placeholders ; ๐ use crate::sol::analysis::for_each_lhs_var ; ๐ use crate::sol::analysis::referenced_item ; ๐ use crate::sol::analysis::write_target ; ๐ use solar::ast::ContractKind; ๐ use solar::ast::FunctionKind; ๐ use solar::interface::diagnostics::Applicability; ๐ use solar::sema::Gcx; ๐ use solar::sema::hir; ๐ use solar::sema::hir::Expr; ๐ use solar::sema::hir::ExprKind; ๐ use solar::sema::hir::Function; ๐ use solar::sema::hir::ItemId; ๐ use solar::sema::hir::Stmt; ๐ use solar::sema::hir::StmtKind; ๐ use solar::sema::hir::Visit as _; ๐ use std::ops::ControlFlow ; ๐ ExprFinder ๐ UNWRAPPED_MODIFIER_LOGIC any_expr ๐ Visits every expression under stmts, stopping as soon as f returns true. is_plain_call ๐ A call to a non-builtin function or to a library function: the only statement cheap enough to
leave inline. requires_wrapping ๐ Whether stmts should move into a helper: anything but a single plain call requires wrapping.
Inline assembly is left alone; its authors know how to manage code size and have a reason to
use it in a modifier. snippet ๐