Skip to content

Commit 8611e29

Browse files
authored
Rollup merge of #93443 - spastorino:add-stable-hash-impl-doc, r=cjgillot
Add comment on stable_hash_impl for OwnerNodes r? `@cjgillot` cc `@oli-obk` `@bors` rollup=always
2 parents 664255b + 5f7b989 commit 8611e29

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_hir/src/stable_hash_impls.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ impl<'tcx, HirCtx: crate::HashStableContext> HashStable<HirCtx> for OwnerNodes<'
206206
fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
207207
// We ignore the `nodes` and `bodies` fields since these refer to information included in
208208
// `hash` which is hashed in the collector and used for the crate hash.
209+
// `local_id_to_def_id` is also ignored because is dependent on the body, then just hashing
210+
// the body satisfies the condition of two nodes being different have different
211+
// `hash_stable` results.
209212
let OwnerNodes {
210213
hash_including_bodies,
211214
hash_without_bodies: _,

0 commit comments

Comments
 (0)