about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-07-31 15:49:50 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-08-07 17:30:45 +0200
commitb0047c18cbcae77e28d37a5b0a3937914218d908 (patch)
tree1549dc73c96401bcf747c151eee0712d6c24e945
parent55f46419afd2e49acfc6be176ad4aeadaa5686d7 (diff)
downloadrust-b0047c18cbcae77e28d37a5b0a3937914218d908.tar.gz
rust-b0047c18cbcae77e28d37a5b0a3937914218d908.zip
Stop forcing the hashing of bodies in types and expressions.
-rw-r--r--compiler/rustc_query_system/src/ich/impls_hir.rs22
1 files changed, 8 insertions, 14 deletions
diff --git a/compiler/rustc_query_system/src/ich/impls_hir.rs b/compiler/rustc_query_system/src/ich/impls_hir.rs
index 3390ed9eb42..6a43487aea8 100644
--- a/compiler/rustc_query_system/src/ich/impls_hir.rs
+++ b/compiler/rustc_query_system/src/ich/impls_hir.rs
@@ -21,22 +21,16 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
     }
 
     fn hash_hir_expr(&mut self, expr: &hir::Expr<'_>, hasher: &mut StableHasher) {
-        self.while_hashing_hir_bodies(true, |hcx| {
-            let hir::Expr { hir_id, ref span, ref kind } = *expr;
-
-            hir_id.hash_stable(hcx, hasher);
-            span.hash_stable(hcx, hasher);
-            kind.hash_stable(hcx, hasher);
-        })
+        let hir::Expr { hir_id, ref span, ref kind } = *expr;
+        hir_id.hash_stable(self, hasher);
+        span.hash_stable(self, hasher);
+        kind.hash_stable(self, hasher);
     }
 
     fn hash_hir_ty(&mut self, ty: &hir::Ty<'_>, hasher: &mut StableHasher) {
-        self.while_hashing_hir_bodies(true, |hcx| {
-            let hir::Ty { hir_id, ref kind, ref span } = *ty;
-
-            hir_id.hash_stable(hcx, hasher);
-            kind.hash_stable(hcx, hasher);
-            span.hash_stable(hcx, hasher);
-        })
+        let hir::Ty { hir_id, ref kind, ref span } = *ty;
+        hir_id.hash_stable(self, hasher);
+        kind.hash_stable(self, hasher);
+        span.hash_stable(self, hasher);
     }
 }