]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/utils/hir_utils.rs
Merge pull request #3303 from shssoichiro/3069-unnecessary-fold-pattern-guard
[rust.git] / clippy_lints / src / utils / hir_utils.rs
index bc55c22979b50a77a86ec5b6b6a93c6c1ad04f16..7a0b28d15d875f47b53d78caed01d7bb1f5f47f0 100644 (file)
@@ -73,6 +73,7 @@ pub fn eq_block(&mut self, left: &Block, right: &Block) -> bool {
             && both(&left.expr, &right.expr, |l, r| self.eq_expr(l, r))
     }
 
+    #[allow(clippy::similar_names)]
     pub fn eq_expr(&mut self, left: &Expr, right: &Expr) -> bool {
         if self.ignore_fn && differing_macro_contexts(left.span, right.span) {
             return false;
@@ -208,6 +209,7 @@ pub fn eq_pat(&mut self, left: &Pat, right: &Pat) -> bool {
         }
     }
 
+    #[allow(clippy::similar_names)]
     fn eq_qpath(&mut self, left: &QPath, right: &QPath) -> bool {
         match (left, right) {
             (&QPath::Resolved(ref lty, ref lpath), &QPath::Resolved(ref rty, ref rpath)) => {
@@ -262,6 +264,7 @@ pub fn eq_ty(&mut self, left: &Ty, right: &Ty) -> bool {
         self.eq_ty_kind(&left.node, &right.node)
     }
 
+    #[allow(clippy::similar_names)]
     pub fn eq_ty_kind(&mut self, left: &TyKind, right: &TyKind) -> bool {
         match (left, right) {
             (&TyKind::Slice(ref l_vec), &TyKind::Slice(ref r_vec)) => self.eq_ty(l_vec, r_vec),