]> git.lizzy.rs Git - rust.git/blobdiff - clippy_utils/src/hir_utils.rs
Downgrade many_single_char_names to pedantic
[rust.git] / clippy_utils / src / hir_utils.rs
index a44f2df2fd631e9793dd022cc50517a48caa7e07..7438b6eabf9e61f267670b1c3df24b4018414ebd 100644 (file)
@@ -232,9 +232,7 @@ pub fn eq_expr(&mut self, left: &Expr<'_>, right: &Expr<'_>) -> bool {
             (&ExprKind::If(lc, lt, ref le), &ExprKind::If(rc, rt, ref re)) => {
                 self.eq_expr(lc, rc) && self.eq_expr(&**lt, &**rt) && both(le, re, |l, r| self.eq_expr(l, r))
             },
-            (&ExprKind::Let(ref lp, ref le, _), &ExprKind::Let(ref rp, ref re, _)) => {
-                self.eq_pat(lp, rp) && self.eq_expr(le, re)
-            },
+            (&ExprKind::Let(lp, le, _), &ExprKind::Let(rp, re, _)) => self.eq_pat(lp, rp) && self.eq_expr(le, re),
             (&ExprKind::Lit(ref l), &ExprKind::Lit(ref r)) => l.node == r.node,
             (&ExprKind::Loop(lb, ref ll, ref lls, _), &ExprKind::Loop(rb, ref rl, ref rls, _)) => {
                 lls == rls && self.eq_block(lb, rb) && both(ll, rl, |l, r| l.ident.name == r.ident.name)
@@ -542,7 +540,7 @@ pub fn hash_block(&mut self, b: &Block<'_>) {
         std::mem::discriminant(&b.rules).hash(&mut self.s);
     }
 
-    #[allow(clippy::many_single_char_names, clippy::too_many_lines)]
+    #[allow(clippy::too_many_lines)]
     pub fn hash_expr(&mut self, e: &Expr<'_>) {
         let simple_const = self
             .maybe_typeck_results
@@ -668,7 +666,7 @@ pub fn hash_expr(&mut self, e: &Expr<'_>) {
                     }
                 }
             },
-            ExprKind::Let(ref pat, ref expr, _) => {
+            ExprKind::Let(pat, expr, _) => {
                 self.hash_expr(expr);
                 self.hash_pat(pat);
             },