about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_utils/src/hir_utils.rs42
1 files changed, 21 insertions, 21 deletions
diff --git a/clippy_utils/src/hir_utils.rs b/clippy_utils/src/hir_utils.rs
index c6f9b563ba3..e9bd4d33ebf 100644
--- a/clippy_utils/src/hir_utils.rs
+++ b/clippy_utils/src/hir_utils.rs
@@ -734,6 +734,9 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                     self.hash_name(i.ident.name);
                 }
             },
+            ExprKind::Array(v) => {
+                self.hash_exprs(v);
+            },
             ExprKind::Assign(l, r, _) => {
                 self.hash_expr(l);
                 self.hash_expr(r);
@@ -743,6 +746,9 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                 self.hash_expr(l);
                 self.hash_expr(r);
             },
+            ExprKind::Become(f) => {
+                self.hash_expr(f);
+            },
             ExprKind::Block(b, _) => {
                 self.hash_block(b);
             },
@@ -759,9 +765,6 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                     self.hash_expr(j);
                 }
             },
-            ExprKind::DropTemps(e) | ExprKind::Yield(e, _) => {
-                self.hash_expr(e);
-            },
             ExprKind::Call(fun, args) => {
                 self.hash_expr(fun);
                 self.hash_exprs(args);
@@ -777,6 +780,12 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                 // closures inherit TypeckResults
                 self.hash_expr(self.cx.tcx.hir().body(body).value);
             },
+            ExprKind::ConstBlock(ref l_id) => {
+                self.hash_body(l_id.body);
+            },
+            ExprKind::DropTemps(e) | ExprKind::Yield(e, _) => {
+                self.hash_expr(e);
+            },
             ExprKind::Field(e, ref f) => {
                 self.hash_expr(e);
                 self.hash_name(f.name);
@@ -838,12 +847,6 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                     }
                 }
             },
-            ExprKind::OffsetOf(container, fields) => {
-                self.hash_ty(container);
-                for field in fields {
-                    self.hash_name(field.name);
-                }
-            },
             ExprKind::Let(Let { pat, init, ty, .. }) => {
                 self.hash_expr(init);
                 if let Some(ty) = ty {
@@ -851,7 +854,6 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                 }
                 self.hash_pat(pat);
             },
-            ExprKind::Err(_) => {},
             ExprKind::Lit(l) => {
                 l.node.hash(&mut self.s);
             },
@@ -886,8 +888,14 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                 self.hash_expr(receiver);
                 self.hash_exprs(args);
             },
-            ExprKind::ConstBlock(ref l_id) => {
-                self.hash_body(l_id.body);
+            ExprKind::OffsetOf(container, fields) => {
+                self.hash_ty(container);
+                for field in fields {
+                    self.hash_name(field.name);
+                }
+            },
+            ExprKind::Path(ref qpath) => {
+                self.hash_qpath(qpath);
             },
             ExprKind::Repeat(e, len) => {
                 self.hash_expr(e);
@@ -898,12 +906,6 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                     self.hash_expr(e);
                 }
             },
-            ExprKind::Become(f) => {
-                self.hash_expr(f);
-            },
-            ExprKind::Path(ref qpath) => {
-                self.hash_qpath(qpath);
-            },
             ExprKind::Struct(path, fields, ref expr) => {
                 self.hash_qpath(path);
 
@@ -919,13 +921,11 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
             ExprKind::Tup(tup) => {
                 self.hash_exprs(tup);
             },
-            ExprKind::Array(v) => {
-                self.hash_exprs(v);
-            },
             ExprKind::Unary(lop, le) => {
                 std::mem::discriminant(&lop).hash(&mut self.s);
                 self.hash_expr(le);
             },
+            ExprKind::Err(_) => {},
         }
     }