Skip to content

Commit

Permalink
Hash hir_owner in typeck results
Browse files Browse the repository at this point in the history
  • Loading branch information
arora-aman committed Mar 19, 2021
1 parent 52dba13 commit 88db752
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ impl<'tcx> TypeckResults<'tcx> {
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for TypeckResults<'tcx> {
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
let ty::TypeckResults {
hir_owner: _,
hir_owner,
ref type_dependent_defs,
ref field_indices,
ref user_provided_types,
Expand All @@ -729,6 +729,8 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for TypeckResults<'tcx> {
} = *self;

hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
hcx.local_def_path_hash(hir_owner);

type_dependent_defs.hash_stable(hcx, hasher);
field_indices.hash_stable(hcx, hasher);
user_provided_types.hash_stable(hcx, hasher);
Expand Down

0 comments on commit 88db752

Please sign in to comment.