about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-02-24 12:58:48 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-02-24 13:44:21 +0000
commit8d4f4e42afc74be02cd3dc040a164a493b41a1bf (patch)
treeb8663c996abd87fc12accfc513cb13c4f194e468
parent9327272d0203deb60def6719b4f890d886653f1c (diff)
downloadrust-8d4f4e42afc74be02cd3dc040a164a493b41a1bf.tar.gz
rust-8d4f4e42afc74be02cd3dc040a164a493b41a1bf.zip
Remove redundant hashing configuration logic in type interner
-rw-r--r--compiler/rustc_middle/src/ty/context.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 0416ed17977..6c0582a240e 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -157,17 +157,12 @@ impl<'tcx> CtxtInterners<'tcx> {
                         Fingerprint::ZERO
                     } else {
                         let mut hasher = StableHasher::new();
-                        let mut hcx = StableHashingContext::new(
+                        let mut hcx = StableHashingContext::ignore_spans(
                             sess,
                             &resolutions.definitions,
                             &*resolutions.cstore,
                         );
-
-                        hcx.while_hashing_spans(false, |hcx| {
-                            hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
-                                kind.hash_stable(hcx, &mut hasher);
-                            });
-                        });
+                        kind.hash_stable(&mut hcx, &mut hasher);
                         hasher.finish()
                     };