diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-02-11 07:48:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-11 07:48:03 +0100 |
| commit | 8611e292e4cf395fa8892803e8f03dff1c5a41eb (patch) | |
| tree | 94290cd298c70a2ee73b1e9d906a5146f072ef1a /compiler/rustc_hir/src/stable_hash_impls.rs | |
| parent | 664255b1687ed165d0f8b6b3025ab988e0a29e48 (diff) | |
| parent | 5f7b9892754b19c3146f24dc3c0cdbda98f6efac (diff) | |
| download | rust-8611e292e4cf395fa8892803e8f03dff1c5a41eb.tar.gz rust-8611e292e4cf395fa8892803e8f03dff1c5a41eb.zip | |
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
Diffstat (limited to 'compiler/rustc_hir/src/stable_hash_impls.rs')
| -rw-r--r-- | compiler/rustc_hir/src/stable_hash_impls.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/stable_hash_impls.rs b/compiler/rustc_hir/src/stable_hash_impls.rs index 7204efc4224..61f03442d61 100644 --- a/compiler/rustc_hir/src/stable_hash_impls.rs +++ b/compiler/rustc_hir/src/stable_hash_impls.rs @@ -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: _, |
