Skip to content

Commit cca960d

Browse files
committed
Fix clippy code
1 parent fface0c commit cca960d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ fn ident_difference_expr_with_base_location(
582582
| (Block(_, _), Block(_, _))
583583
| (Closure(_), Closure(_))
584584
| (Match(_, _), Match(_, _))
585-
| (Loop(_, _), Loop(_, _))
585+
| (Loop(_, _, _), Loop(_, _, _))
586586
| (ForLoop(_, _, _, _), ForLoop(_, _, _, _))
587587
| (While(_, _, _), While(_, _, _))
588588
| (If(_, _, _), If(_, _, _))

src/tools/clippy/clippy_utils/src/ast_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
163163
(ForLoop(lp, li, lt, ll), ForLoop(rp, ri, rt, rl)) => {
164164
eq_label(ll, rl) && eq_pat(lp, rp) && eq_expr(li, ri) && eq_block(lt, rt)
165165
},
166-
(Loop(lt, ll), Loop(rt, rl)) => eq_label(ll, rl) && eq_block(lt, rt),
166+
(Loop(lt, ll, _), Loop(rt, rl, _)) => eq_label(ll, rl) && eq_block(lt, rt),
167167
(Block(lb, ll), Block(rb, rl)) => eq_label(ll, rl) && eq_block(lb, rb),
168168
(TryBlock(l), TryBlock(r)) => eq_block(l, r),
169169
(Yield(l), Yield(r)) | (Ret(l), Ret(r)) => eq_expr_opt(l, r),

0 commit comments

Comments
 (0)