- (&ExprMatch(ref le, ref la, ref ls), &ExprMatch(ref re, ref ra, ref rs)) => {
- ls == rs && self.eq_expr(le, re) && over(la, ra, |l, r| {
- self.eq_expr(&l.body, &r.body) && both(&l.guard, &r.guard, |l, r| self.eq_expr(l, r))
- && over(&l.pats, &r.pats, |l, r| self.eq_pat(l, r))
- })
+ (&ExprKind::Lit(ref l), &ExprKind::Lit(ref r)) => l.node == r.node,
+ (&ExprKind::Loop(ref lb, ref ll, ref lls), &ExprKind::Loop(ref rb, ref rl, ref rls)) => {
+ lls == rls && self.eq_block(lb, rb) && both(ll, rl, |l, r| l.ident.as_str() == r.ident.as_str())
+ },
+ (&ExprKind::Match(ref le, ref la, ref ls), &ExprKind::Match(ref re, ref ra, ref rs)) => {
+ ls == rs
+ && self.eq_expr(le, re)
+ && over(la, ra, |l, r| {
+ self.eq_expr(&l.body, &r.body)
+ && both(&l.guard, &r.guard, |l, r| self.eq_guard(l, r))
+ && over(&l.pats, &r.pats, |l, r| self.eq_pat(l, r))
+ })