1
Fork 0

Do not compute entry parent when not required.

This commit is contained in:
Camille GILLOT 2021-03-03 21:50:45 +01:00
parent 2d341e1e28
commit 99d3798b6c
3 changed files with 127 additions and 100 deletions

View file

@ -38,10 +38,10 @@ pub struct Owner<'tcx> {
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for Owner<'tcx> {
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
let Owner { parent, node } = self;
let Owner { node, parent } = self;
hcx.while_hashing_hir_bodies(false, |hcx| {
parent.hash_stable(hcx, hasher);
node.hash_stable(hcx, hasher);
node.hash_stable(hcx, hasher)
});
}
}