Skip to content

Commit

Permalink
Backport fixes -- drop uses of NodeIdHashingMode
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Apr 24, 2022
1 parent 7ce8e0e commit d76101d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions compiler/rustc_middle/src/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use rustc_ast as ast;
use rustc_attr as attr;
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
use rustc_data_structures::intern::Interned;
use rustc_data_structures::stable_hasher::{HashStable, NodeIdHashingMode, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::tagged_ptr::CopyTaggedPtr;
use rustc_hir as hir;
use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res};
Expand Down Expand Up @@ -484,11 +484,7 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for Ty<'tcx> {

let stable_hash: Fingerprint = {
let mut hasher = StableHasher::new();
hcx.while_hashing_spans(false, |hcx| {
hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
kind.hash_stable(hcx, &mut hasher)
})
});
hcx.while_hashing_spans(false, |hcx| kind.hash_stable(hcx, &mut hasher));
hasher.finish()
};
stable_hash.hash_stable(hcx, hasher);
Expand Down

0 comments on commit d76101d

Please sign in to comment.