From 8d4f4e42afc74be02cd3dc040a164a493b41a1bf Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 24 Feb 2022 12:58:48 +0000 Subject: [PATCH] Remove redundant hashing configuration logic in type interner --- compiler/rustc_middle/src/ty/context.rs | 9 ++------- 1 file 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 @@ fn intern_ty( 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() }; -- 2.44.0