diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-03-01 14:51:08 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-03-31 14:54:04 +0000 |
| commit | 00c24dd8cec6c57ccbfb376c4a2f47b5f6e39401 (patch) | |
| tree | 0050c3bd37f4b882b725d968163f689631e4197b /compiler/rustc_query_system/src | |
| parent | df20355fa9fa5e9fb89be4e4bfee8a643bb7a23e (diff) | |
| download | rust-00c24dd8cec6c57ccbfb376c4a2f47b5f6e39401.tar.gz rust-00c24dd8cec6c57ccbfb376c4a2f47b5f6e39401.zip | |
Move stable hash from TyS into a datastructure that can be shared with other interned types.
Diffstat (limited to 'compiler/rustc_query_system/src')
| -rw-r--r-- | compiler/rustc_query_system/src/ich/hcx.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_query_system/src/ich/hcx.rs b/compiler/rustc_query_system/src/ich/hcx.rs index 76e21be17bc..a073bf71057 100644 --- a/compiler/rustc_query_system/src/ich/hcx.rs +++ b/compiler/rustc_query_system/src/ich/hcx.rs @@ -231,4 +231,12 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> { } } +impl<'a> rustc_data_structures::intern::InternedHashingContext for StableHashingContext<'a> { + fn with_def_path_and_no_spans(&mut self, f: impl FnOnce(&mut Self)) { + self.while_hashing_spans(false, |hcx| { + hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| f(hcx)) + }); + } +} + impl<'a> rustc_session::HashStableContext for StableHashingContext<'a> {} |
