Do not compute entry parent when not required.
This commit is contained in:
parent
2d341e1e28
commit
99d3798b6c
3 changed files with 127 additions and 100 deletions
|
@ -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)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue