#[derive(Copy, Clone, Default)]
pub struct Pass {
- loop_count : usize,
+ loop_count: usize,
}
impl LintPass for Pass {
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
fn check_expr_post(&mut self, _: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
match expr.node {
- ExprWhile(..) | ExprLoop(..) => { self.loop_count -= 1; }
- _ => ()
+ ExprWhile(..) | ExprLoop(..) => {
+ self.loop_count -= 1;
+ },
+ _ => (),
}
}
over(&l.pats, &r.pats, |l, r| self.eq_pat(l, r))
})
},
- (&ExprMethodCall(ref l_path, _, ref l_args),
- &ExprMethodCall(ref r_path, _, ref r_args)) => {
+ (&ExprMethodCall(ref l_path, _, ref l_args), &ExprMethodCall(ref r_path, _, ref r_args)) => {
!self.ignore_fn && l_path == r_path && self.eq_exprs(l_args, r_args)
},
(&ExprRepeat(ref le, ll_id), &ExprRepeat(ref re, rl_id)) => {