Stop forcing the hashing of bodies in types and expressions.
This commit is contained in:
parent
55f46419af
commit
b0047c18cb
1 changed files with 8 additions and 14 deletions
|
@ -21,22 +21,16 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash_hir_expr(&mut self, expr: &hir::Expr<'_>, hasher: &mut StableHasher) {
|
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;
|
||||||
let hir::Expr { hir_id, ref span, ref kind } = *expr;
|
hir_id.hash_stable(self, hasher);
|
||||||
|
span.hash_stable(self, hasher);
|
||||||
hir_id.hash_stable(hcx, hasher);
|
kind.hash_stable(self, hasher);
|
||||||
span.hash_stable(hcx, hasher);
|
|
||||||
kind.hash_stable(hcx, hasher);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash_hir_ty(&mut self, ty: &hir::Ty<'_>, hasher: &mut StableHasher) {
|
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;
|
||||||
let hir::Ty { hir_id, ref kind, ref span } = *ty;
|
hir_id.hash_stable(self, hasher);
|
||||||
|
kind.hash_stable(self, hasher);
|
||||||
hir_id.hash_stable(hcx, hasher);
|
span.hash_stable(self, hasher);
|
||||||
kind.hash_stable(hcx, hasher);
|
|
||||||
span.hash_stable(hcx, hasher);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue