From 66dcd5c33c91c2b2275ae83f820039b87240f72b Mon Sep 17 00:00:00 2001 From: plotchy Date: Wed, 26 Jun 2024 15:14:13 -0400 Subject: [PATCH] more clippy --- crates/graph/src/range/elem/elem_enum/arena.rs | 12 ++++++------ crates/graph/src/range/elem/map_or_array.rs | 4 ++-- crates/graph/src/range/exec/math_ops/sub.rs | 2 +- crates/solc-expressions/src/array.rs | 2 +- crates/solc-expressions/src/bin_op.rs | 2 +- crates/solc-expressions/src/cmp.rs | 2 +- .../src/context_builder/expr.rs | 2 +- .../src/context_builder/stmt.rs | 6 +++--- .../src/func_call/func_caller.rs | 6 +++--- .../solc-expressions/src/func_call/helper.rs | 4 ++-- .../src/func_call/internal_call.rs | 2 +- .../src/func_call/intrinsic_call/abi.rs | 2 +- .../src/func_call/intrinsic_call/block.rs | 2 +- .../func_call/intrinsic_call/constructors.rs | 2 +- .../func_call/intrinsic_call/dyn_builtin.rs | 2 +- .../intrinsic_call/intrinsic_caller.rs | 4 ++-- .../src/func_call/intrinsic_call/precompile.rs | 6 +++--- .../src/func_call/intrinsic_call/solidity.rs | 4 ++-- .../src/func_call/namespaced_call.rs | 2 +- crates/solc-expressions/src/list.rs | 6 +++--- .../src/member_access/member_trait.rs | 2 +- crates/solc-expressions/src/variable.rs | 4 ++-- crates/solc-expressions/src/yul/yul_builder.rs | 6 +++--- crates/solc-expressions/src/yul/yul_funcs.rs | 18 +++++++++--------- 24 files changed, 52 insertions(+), 52 deletions(-) diff --git a/crates/graph/src/range/elem/elem_enum/arena.rs b/crates/graph/src/range/elem/elem_enum/arena.rs index d1427139..6e7925b0 100644 --- a/crates/graph/src/range/elem/elem_enum/arena.rs +++ b/crates/graph/src/range/elem/elem_enum/arena.rs @@ -125,12 +125,12 @@ impl RangeArenaLike> for RangeArena> { self.map.insert(Elem::Null, 0); } - let nulls = self.ranges.iter().fold(0, |mut acc, e| { - if matches!(e, Elem::Null) { - acc += 1; - } - acc - }); + // let nulls = self.ranges.iter().fold(0, |mut acc, e| { + // if matches!(e, Elem::Null) { + // acc += 1; + // } + // acc + // }); // println!( // "{}\nhad cycle:\n{:?}", diff --git a/crates/graph/src/range/elem/map_or_array.rs b/crates/graph/src/range/elem/map_or_array.rs index 2f1f0e08..7954f60b 100644 --- a/crates/graph/src/range/elem/map_or_array.rs +++ b/crates/graph/src/range/elem/map_or_array.rs @@ -286,8 +286,8 @@ impl RangeElem for RangeDyn { .map(|(k, (v, op))| { let mut new_k = k.clone(); let mut new_v = v.clone(); - new_k.arenaize(analyzer, arena); - new_v.arenaize(analyzer, arena); + let _ =new_k.arenaize(analyzer, arena); + let _ =new_v.arenaize(analyzer, arena); (new_k, (new_v, *op)) }) .collect(); diff --git a/crates/graph/src/range/exec/math_ops/sub.rs b/crates/graph/src/range/exec/math_ops/sub.rs index acc5e1d1..7030e3d2 100644 --- a/crates/graph/src/range/exec/math_ops/sub.rs +++ b/crates/graph/src/range/exec/math_ops/sub.rs @@ -190,7 +190,7 @@ pub fn exec_sub( rhs_max: &Elem, maximize: bool, wrapping: bool, - analyzer: &impl GraphBackend, + _analyzer: &impl GraphBackend, arena: &mut RangeArena>, ) -> Option> { // quick check if rhs is const and zero, if so return min or max diff --git a/crates/solc-expressions/src/array.rs b/crates/solc-expressions/src/array.rs index a1d61761..de87e1ef 100644 --- a/crates/solc-expressions/src/array.rs +++ b/crates/solc-expressions/src/array.rs @@ -27,7 +27,7 @@ pub trait Array: AnalyzerBackend + Sized { ctx: ContextNode, ) -> Result<(), ExprErr> { self.parse_ctx_expr(arena, ty_expr, ctx)?; - self.apply_to_edges(ctx, ty_expr.loc(), arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, ty_expr.loc(), arena, &|analyzer, _arena, ctx, loc| { if let Some(ret) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? { if matches!(ret, ExprRet::CtxKilled(_)) { ctx.push_expr(ret, analyzer).into_expr_err(loc)?; diff --git a/crates/solc-expressions/src/bin_op.rs b/crates/solc-expressions/src/bin_op.rs index 57aad7ff..cb52ed98 100644 --- a/crates/solc-expressions/src/bin_op.rs +++ b/crates/solc-expressions/src/bin_op.rs @@ -378,7 +378,7 @@ pub trait BinOp: AnalyzerBackend + Sized { fn checked_require_mod_div( &mut self, arena: &mut RangeArena>, - lhs: ContextVarNode, + _lhs: ContextVarNode, rhs: ContextVarNode, loc: Loc, ctx: ContextNode, diff --git a/crates/solc-expressions/src/cmp.rs b/crates/solc-expressions/src/cmp.rs index e66b53f7..8cb9fba3 100644 --- a/crates/solc-expressions/src/cmp.rs +++ b/crates/solc-expressions/src/cmp.rs @@ -64,7 +64,7 @@ pub trait Cmp: AnalyzerBackend + Sized { RangeOp::Not, Elem::Null, )); - elem.arenaize(self, arena); + let _ = elem.arenaize(self, arena); let mut range = SolcRange::new(elem.clone(), elem, vec![]); range.cache_eval(self, arena).into_expr_err(loc)?; diff --git a/crates/solc-expressions/src/context_builder/expr.rs b/crates/solc-expressions/src/context_builder/expr.rs index ded16451..4c47b50c 100644 --- a/crates/solc-expressions/src/context_builder/expr.rs +++ b/crates/solc-expressions/src/context_builder/expr.rs @@ -385,7 +385,7 @@ pub trait ExpressionParser: } self.parse_ctx_expr(arena, expr, ctx)?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { tracing::trace!("Delete variable pop"); let Some(ret) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( diff --git a/crates/solc-expressions/src/context_builder/stmt.rs b/crates/solc-expressions/src/context_builder/stmt.rs index 07137a0f..d3c52d7d 100644 --- a/crates/solc-expressions/src/context_builder/stmt.rs +++ b/crates/solc-expressions/src/context_builder/stmt.rs @@ -236,7 +236,7 @@ pub trait StatementParser: ctx_node.into(), *loc, arena, - &|analyzer, arena, ctx, loc| { + &|analyzer, _arena, ctx, loc| { if ctx.killed_or_ret(analyzer).into_expr_err(loc)? { tracing::trace!("killing due to bad funciton call"); let res = ContextNode::from(ctx_node) @@ -415,7 +415,7 @@ pub trait StatementParser: ctx, *loc, arena, - &|analyzer, arena, ctx, loc| { + &|analyzer, _arena, ctx, loc| { if ctx.killed_or_ret(analyzer).into_expr_err(loc)? { tracing::trace!("killing due to bad expr"); ContextNode::from(parent.into()) @@ -550,7 +550,7 @@ pub trait StatementParser: if let Some(parent) = parent_ctx { let parent = ContextNode::from(parent.into()); let res = - self.apply_to_edges(parent, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(parent, *loc, arena, &|analyzer, _arena, ctx, loc| { let res = ctx .kill(analyzer, loc, KilledKind::Revert) .into_expr_err(loc); diff --git a/crates/solc-expressions/src/func_call/func_caller.rs b/crates/solc-expressions/src/func_call/func_caller.rs index 143b316b..e30f639d 100644 --- a/crates/solc-expressions/src/func_call/func_caller.rs +++ b/crates/solc-expressions/src/func_call/func_caller.rs @@ -81,7 +81,7 @@ impl<'a> NamedOrUnnamedArgs<'a> { Ok(()) })?; if !inner.is_empty() { - analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_tmp_expr(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc, @@ -113,7 +113,7 @@ impl<'a> NamedOrUnnamedArgs<'a> { Ok(()) })?; if !inner.is_empty() { - analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_tmp_expr(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc, @@ -132,7 +132,7 @@ impl<'a> NamedOrUnnamedArgs<'a> { Ok(()) })?; if !inner.is_empty() { - analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_tmp_expr(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc, diff --git a/crates/solc-expressions/src/func_call/helper.rs b/crates/solc-expressions/src/func_call/helper.rs index e5d87812..3def7e6d 100644 --- a/crates/solc-expressions/src/func_call/helper.rs +++ b/crates/solc-expressions/src/func_call/helper.rs @@ -142,7 +142,7 @@ pub trait CallerHelper: AnalyzerBackend + .try_for_each(|input| self.parse_input(arena, ctx, loc, input, &append))?; if !inputs.is_empty() { - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_tmp_expr(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc, @@ -165,7 +165,7 @@ pub trait CallerHelper: AnalyzerBackend + append: &Rc>, ) -> Result<(), ExprErr> { self.parse_ctx_expr(arena, input, ctx)?; - self.apply_to_edges(ctx, input.loc(), arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, input.loc(), arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc, diff --git a/crates/solc-expressions/src/func_call/internal_call.rs b/crates/solc-expressions/src/func_call/internal_call.rs index d771fbab..89c10602 100644 --- a/crates/solc-expressions/src/func_call/internal_call.rs +++ b/crates/solc-expressions/src/func_call/internal_call.rs @@ -148,7 +148,7 @@ pub trait InternalFuncCaller: Ok(()) }) })?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, _loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, _loc| { ctx.push_expr(ExprRet::Single(cvar), analyzer) .into_expr_err(*loc)?; Ok(()) diff --git a/crates/solc-expressions/src/func_call/intrinsic_call/abi.rs b/crates/solc-expressions/src/func_call/intrinsic_call/abi.rs index 589b729d..1651866f 100644 --- a/crates/solc-expressions/src/func_call/intrinsic_call/abi.rs +++ b/crates/solc-expressions/src/func_call/intrinsic_call/abi.rs @@ -94,7 +94,7 @@ pub trait AbiCaller: AnalyzerBackend + Siz } let input_exprs = input_exprs.unnamed_args().unwrap(); self.parse_ctx_expr(arena, &input_exprs[1], ctx)?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( loc, diff --git a/crates/solc-expressions/src/func_call/intrinsic_call/block.rs b/crates/solc-expressions/src/func_call/intrinsic_call/block.rs index 36755007..ccf01350 100644 --- a/crates/solc-expressions/src/func_call/intrinsic_call/block.rs +++ b/crates/solc-expressions/src/func_call/intrinsic_call/block.rs @@ -26,7 +26,7 @@ pub trait BlockCaller: AnalyzerBackend + S match &*func_name { "blockhash" => { input_exprs.parse_n(arena, 1, self, ctx, loc)?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(input) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( loc, diff --git a/crates/solc-expressions/src/func_call/intrinsic_call/constructors.rs b/crates/solc-expressions/src/func_call/intrinsic_call/constructors.rs index 88ce7772..22bcf921 100644 --- a/crates/solc-expressions/src/func_call/intrinsic_call/constructors.rs +++ b/crates/solc-expressions/src/func_call/intrinsic_call/constructors.rs @@ -126,7 +126,7 @@ pub trait ConstructorCaller: if !input_exprs.is_empty() { self.parse_ctx_expr(arena, &input_exprs.unnamed_args().unwrap()[0], ctx)?; } - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { if !input_exprs.is_empty() { let Some(ret) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs(loc, "Contract creation failed".to_string())); diff --git a/crates/solc-expressions/src/func_call/intrinsic_call/dyn_builtin.rs b/crates/solc-expressions/src/func_call/intrinsic_call/dyn_builtin.rs index d7f88fac..410d36aa 100644 --- a/crates/solc-expressions/src/func_call/intrinsic_call/dyn_builtin.rs +++ b/crates/solc-expressions/src/func_call/intrinsic_call/dyn_builtin.rs @@ -51,7 +51,7 @@ pub trait DynBuiltinCaller: AnalyzerBackend v, None => { @@ -141,7 +141,7 @@ pub trait IntrinsicFuncCaller: None, None, )?; - analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let var = match ContextVar::maybe_from_user_ty(analyzer, loc, ty_idx) { Some(v) => v, None => { diff --git a/crates/solc-expressions/src/func_call/intrinsic_call/precompile.rs b/crates/solc-expressions/src/func_call/intrinsic_call/precompile.rs index 7dcd2249..9c6908a0 100644 --- a/crates/solc-expressions/src/func_call/intrinsic_call/precompile.rs +++ b/crates/solc-expressions/src/func_call/intrinsic_call/precompile.rs @@ -35,7 +35,7 @@ pub trait PrecompileCaller: match &*func_name { "sha256" => { self.parse_ctx_expr(arena, &input_exprs.unnamed_args().unwrap()[0], ctx)?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(input) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( loc, @@ -60,7 +60,7 @@ pub trait PrecompileCaller: } "ripemd160" => { self.parse_ctx_expr(arena, &input_exprs.unnamed_args().unwrap()[0], ctx)?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(input) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( loc, @@ -85,7 +85,7 @@ pub trait PrecompileCaller: } "ecrecover" => { input_exprs.parse(arena, self, ctx, loc)?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let cctx = Context::new_subctx( ctx, None, diff --git a/crates/solc-expressions/src/func_call/intrinsic_call/solidity.rs b/crates/solc-expressions/src/func_call/intrinsic_call/solidity.rs index 056e3ca0..0cb1f277 100644 --- a/crates/solc-expressions/src/func_call/intrinsic_call/solidity.rs +++ b/crates/solc-expressions/src/func_call/intrinsic_call/solidity.rs @@ -82,7 +82,7 @@ pub trait SolidityCaller: // TODO: actually calcuate this if possible input_exprs.parse(arena, self, ctx, loc)?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)?; let var = ContextVar::new_from_builtin( loc, @@ -99,7 +99,7 @@ pub trait SolidityCaller: "mulmod" => { // TODO: actually calcuate this if possible input_exprs.parse(arena, self, ctx, loc)?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)?; let var = ContextVar::new_from_builtin( loc, diff --git a/crates/solc-expressions/src/func_call/namespaced_call.rs b/crates/solc-expressions/src/func_call/namespaced_call.rs index a4c989e7..af229b61 100644 --- a/crates/solc-expressions/src/func_call/namespaced_call.rs +++ b/crates/solc-expressions/src/func_call/namespaced_call.rs @@ -310,7 +310,7 @@ pub trait NameSpaceFuncCaller: let _ = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)?; Ok(()) })?; - analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, _loc| { + analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, _loc| { ctx.push_expr(ExprRet::Single(cvar), analyzer) .into_expr_err(loc)?; Ok(()) diff --git a/crates/solc-expressions/src/list.rs b/crates/solc-expressions/src/list.rs index ef19a590..263dad5c 100644 --- a/crates/solc-expressions/src/list.rs +++ b/crates/solc-expressions/src/list.rs @@ -23,7 +23,7 @@ pub trait List: AnalyzerBackend + Sized { params.iter().try_for_each(|(loc, input)| { if let Some(input) = input { self.parse_ctx_expr(arena, &input.ty, ctx)?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc, @@ -39,13 +39,13 @@ pub trait List: AnalyzerBackend + Sized { }) } else { // create a dummy var - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { ctx.append_tmp_expr(ExprRet::Null, analyzer) .into_expr_err(loc) }) } })?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_tmp_expr(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc, diff --git a/crates/solc-expressions/src/member_access/member_trait.rs b/crates/solc-expressions/src/member_access/member_trait.rs index ab26fe1b..d266afeb 100644 --- a/crates/solc-expressions/src/member_access/member_trait.rs +++ b/crates/solc-expressions/src/member_access/member_trait.rs @@ -51,7 +51,7 @@ pub trait MemberAccess: } self.parse_ctx_expr(arena, member_expr, ctx)?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc, diff --git a/crates/solc-expressions/src/variable.rs b/crates/solc-expressions/src/variable.rs index d7d774ee..daa8cda5 100644 --- a/crates/solc-expressions/src/variable.rs +++ b/crates/solc-expressions/src/variable.rs @@ -40,7 +40,7 @@ pub trait Variable: AnalyzerBackend + Size target_ctx, ident.loc, arena, - &|analyzer, arena, edge_ctx, _loc| { + &|analyzer, _arena, edge_ctx, _loc| { let var = analyzer.advance_var_in_ctx(cvar, ident.loc, edge_ctx)?; edge_ctx .push_expr(ExprRet::Single(var.into()), analyzer) @@ -60,7 +60,7 @@ pub trait Variable: AnalyzerBackend + Size target_ctx, ident.loc, arena, - &|analyzer, arena, edge_ctx, _loc| { + &|analyzer, _arena, edge_ctx, _loc| { let var = analyzer.advance_var_in_ctx(cvar, ident.loc, edge_ctx)?; edge_ctx .push_expr(ExprRet::Single(var.into()), analyzer) diff --git a/crates/solc-expressions/src/yul/yul_builder.rs b/crates/solc-expressions/src/yul/yul_builder.rs index 7383337e..b878b7e8 100644 --- a/crates/solc-expressions/src/yul/yul_builder.rs +++ b/crates/solc-expressions/src/yul/yul_builder.rs @@ -155,7 +155,7 @@ pub trait YulBuilder: if let Some(yul_expr) = maybe_yul_expr { analyzer.parse_ctx_yul_expr(arena, yul_expr, ctx)?; - analyzer.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + analyzer.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { @@ -312,7 +312,7 @@ pub trait YulBuilder: StringLiteral(lit, _) => self.string_literal(ctx, lit.loc, &lit.string), Variable(ident) => { self.variable(arena, ident, ctx, None)?; - self.apply_to_edges(ctx, ident.loc, arena, &|analyzer, arena, edge_ctx, loc| { + self.apply_to_edges(ctx, ident.loc, arena, &|analyzer, _arena, edge_ctx, loc| { if let Some(ret) = edge_ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? { if ContextVarNode::from(ret.expect_single().into_expr_err(loc)?) .is_memory(analyzer) @@ -345,7 +345,7 @@ pub trait YulBuilder: SuffixAccess(loc, yul_member_expr, ident) => { self.parse_inputs(arena, ctx, *loc, &[*yul_member_expr.clone()])?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { let Ok(Some(lhs)) = ctx.pop_expr_latest(loc, analyzer) else { return Err(ExprErr::NoLhs( loc, diff --git a/crates/solc-expressions/src/yul/yul_funcs.rs b/crates/solc-expressions/src/yul/yul_funcs.rs index 6702fb51..faf389d7 100644 --- a/crates/solc-expressions/src/yul/yul_funcs.rs +++ b/crates/solc-expressions/src/yul/yul_funcs.rs @@ -80,7 +80,7 @@ pub trait YulFuncCaller: return Ok(()); } analyzer.parse_ctx_yul_expr(arena, &arguments[1], ctx)?; - analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + analyzer.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(size) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs(loc, "Yul Return had no size".to_string())); @@ -361,7 +361,7 @@ pub trait YulFuncCaller: } self.parse_ctx_yul_expr(arena, &arguments[0], ctx)?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { let Some(lhs_paths) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( @@ -544,7 +544,7 @@ pub trait YulFuncCaller: } "balance" => { self.parse_ctx_yul_expr(arena, &arguments[0], ctx)?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { let Some(lhs_paths) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( @@ -592,7 +592,7 @@ pub trait YulFuncCaller: } "extcodesize" => { self.parse_ctx_yul_expr(arena, &arguments[0], ctx)?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { let Some(lhs_paths) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( @@ -641,7 +641,7 @@ pub trait YulFuncCaller: } self.parse_inputs(arena, ctx, *loc, arguments)?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { let Some(_lhs_paths) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( @@ -666,7 +666,7 @@ pub trait YulFuncCaller: } self.parse_inputs(arena, ctx, *loc, arguments)?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { let Some(_lhs_paths) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( @@ -680,7 +680,7 @@ pub trait YulFuncCaller: } "extcodehash" => { self.parse_ctx_yul_expr(arena, &arguments[0], ctx)?; - self.apply_to_edges(ctx, *loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, *loc, arena, &|analyzer, _arena, ctx, loc| { let Some(lhs_paths) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoRhs( @@ -775,7 +775,7 @@ pub trait YulFuncCaller: inputs.iter().try_for_each(|input| { self.parse_ctx_yul_expr(arena, input, ctx)?; - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_expr_latest(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc, @@ -795,7 +795,7 @@ pub trait YulFuncCaller: }) })?; if !inputs.is_empty() { - self.apply_to_edges(ctx, loc, arena, &|analyzer, arena, ctx, loc| { + self.apply_to_edges(ctx, loc, arena, &|analyzer, _arena, ctx, loc| { let Some(ret) = ctx.pop_tmp_expr(loc, analyzer).into_expr_err(loc)? else { return Err(ExprErr::NoLhs( loc,