Skip to content

Commit

Permalink
Remove redundant hashing configuration logic in type interner
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Feb 24, 2022
1 parent 9327272 commit 8d4f4e4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
};

Expand Down

0 comments on commit 8d4f4e4

Please sign in to comment.