Skip to content

Commit

Permalink
Rollup merge of #93443 - spastorino:add-stable-hash-impl-doc, r=cjgillot
Browse files Browse the repository at this point in the history
Add comment on stable_hash_impl for OwnerNodes

r? `@cjgillot`

cc `@oli-obk`

`@bors` rollup=always
  • Loading branch information
matthiaskrgr authored Feb 11, 2022
2 parents 664255b + 5f7b989 commit 8611e29
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_hir/src/stable_hash_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ impl<'tcx, HirCtx: crate::HashStableContext> HashStable<HirCtx> for OwnerNodes<'
fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
// We ignore the `nodes` and `bodies` fields since these refer to information included in
// `hash` which is hashed in the collector and used for the crate hash.
// `local_id_to_def_id` is also ignored because is dependent on the body, then just hashing
// the body satisfies the condition of two nodes being different have different
// `hash_stable` results.
let OwnerNodes {
hash_including_bodies,
hash_without_bodies: _,
Expand Down

0 comments on commit 8611e29

Please sign in to comment.