summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_query_system/src/ich/impls_hir.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
commit17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch)
tree3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /compiler/rustc_query_system/src/ich/impls_hir.rs
parentAdding upstream version 1.64.0+dfsg1. (diff)
downloadrustc-upstream/1.65.0+dfsg1.tar.xz
rustc-upstream/1.65.0+dfsg1.zip
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_query_system/src/ich/impls_hir.rs')
-rw-r--r--compiler/rustc_query_system/src/ich/impls_hir.rs24
1 files changed, 2 insertions, 22 deletions
diff --git a/compiler/rustc_query_system/src/ich/impls_hir.rs b/compiler/rustc_query_system/src/ich/impls_hir.rs
index 3390ed9eb..aa008d404 100644
--- a/compiler/rustc_query_system/src/ich/impls_hir.rs
+++ b/compiler/rustc_query_system/src/ich/impls_hir.rs
@@ -12,31 +12,11 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
let hcx = self;
match hcx.body_resolver {
BodyResolver::Forbidden => panic!("Hashing HIR bodies is forbidden."),
- BodyResolver::Traverse { hash_bodies: false, .. } => {}
- BodyResolver::Traverse { hash_bodies: true, owner, bodies } => {
+ BodyResolver::Ignore => {}
+ BodyResolver::Traverse { owner, bodies } => {
assert_eq!(id.hir_id.owner, owner);
bodies[&id.hir_id.local_id].hash_stable(hcx, hasher);
}
}
}
-
- 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);
- })
- }
-
- 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);
- })
- }
}