@@ -3,7 +3,7 @@ use std::ops::ControlFlow;
3
3
4
4
use clippy_utils:: consts:: { constant, Constant } ;
5
5
use clippy_utils:: diagnostics:: span_lint;
6
- use clippy_utils:: visitors:: { for_each_expr , Descend } ;
6
+ use clippy_utils:: visitors:: { for_each_expr_without_closures , Descend } ;
7
7
use clippy_utils:: { method_chain_args, sext} ;
8
8
use rustc_hir:: { BinOpKind , Expr , ExprKind } ;
9
9
use rustc_lint:: LateContext ;
@@ -266,7 +266,7 @@ fn expr_add_sign(cx: &LateContext<'_>, expr: &Expr<'_>) -> Sign {
266
266
fn exprs_with_muldiv_binop_peeled < ' e > ( expr : & ' e Expr < ' _ > ) -> Vec < & ' e Expr < ' e > > {
267
267
let mut res = vec ! [ ] ;
268
268
269
- for_each_expr ( expr, |sub_expr| -> ControlFlow < Infallible , Descend > {
269
+ for_each_expr_without_closures ( expr, |sub_expr| -> ControlFlow < Infallible , Descend > {
270
270
// We don't check for mul/div/rem methods here, but we could.
271
271
if let ExprKind :: Binary ( op, lhs, _rhs) = sub_expr. kind {
272
272
if matches ! ( op. node, BinOpKind :: Mul | BinOpKind :: Div ) {
@@ -315,7 +315,7 @@ fn exprs_with_muldiv_binop_peeled<'e>(expr: &'e Expr<'_>) -> Vec<&'e Expr<'e>> {
315
315
fn exprs_with_add_binop_peeled < ' e > ( expr : & ' e Expr < ' _ > ) -> Vec < & ' e Expr < ' e > > {
316
316
let mut res = vec ! [ ] ;
317
317
318
- for_each_expr ( expr, |sub_expr| -> ControlFlow < Infallible , Descend > {
318
+ for_each_expr_without_closures ( expr, |sub_expr| -> ControlFlow < Infallible , Descend > {
319
319
// We don't check for add methods here, but we could.
320
320
if let ExprKind :: Binary ( op, _lhs, _rhs) = sub_expr. kind {
321
321
if matches ! ( op. node, BinOpKind :: Add ) {
0 commit comments