Skip to content

Commit ff2487b

Browse files
committed
permit more equalities
1 parent cf1fa94 commit ff2487b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clippy_lints/src/utils/hir.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
101101
self.eq_expr(lc, rc) && self.eq_block(lt, rt) && both(le, re, |l, r| self.eq_expr(l, r))
102102
}
103103
(&ExprLit(ref l), &ExprLit(ref r)) => l.node == r.node,
104-
(&ExprLoop(ref lb, ref ll, ref lls), &ExprLoop(ref rb, ref rl, ref rls)) => {
105-
self.eq_block(lb, rb) && both(ll, rl, |l, r| l.node.as_str() == r.node.as_str()) && lls == rls
104+
(&ExprLoop(ref lb, ref ll, _), &ExprLoop(ref rb, ref rl, _)) => {
105+
self.eq_block(lb, rb) && both(ll, rl, |l, r| l.node.as_str() == r.node.as_str())
106106
}
107107
(&ExprMatch(ref le, ref la, _), &ExprMatch(ref re, ref ra, _)) => {
108108
self.eq_expr(le, re) &&
@@ -380,14 +380,13 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
380380
c.hash(&mut self.s);
381381
l.hash(&mut self.s);
382382
}
383-
ExprLoop(ref b, ref i, ref j) => {
383+
ExprLoop(ref b, ref i, _) => {
384384
let c: fn(_, _, _) -> _ = ExprLoop;
385385
c.hash(&mut self.s);
386386
self.hash_block(b);
387387
if let Some(i) = *i {
388388
self.hash_name(&i.node);
389389
}
390-
j.hash(&mut self.s);
391390
}
392391
ExprMatch(ref e, ref arms, _) => {
393392
let c: fn(_, _, _) -> _ = ExprMatch;

0 commit comments

Comments
 (0)