about summary refs log tree commit diff
path: root/compiler/rustc_hir/src/stable_hash_impls.rs
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-01-30 23:25:03 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2021-02-15 19:32:29 +0100
commit786a80e9ea7af4909f67207c542eb02727f74756 (patch)
tree393e94827c3a7e0209a68e7c2e83304538628041 /compiler/rustc_hir/src/stable_hash_impls.rs
parenta871a0f11196ed028edeedc4843338f702880672 (diff)
downloadrust-786a80e9ea7af4909f67207c542eb02727f74756.tar.gz
rust-786a80e9ea7af4909f67207c542eb02727f74756.zip
Only store a LocalDefId in hir::ImplItem.
Diffstat (limited to 'compiler/rustc_hir/src/stable_hash_impls.rs')
-rw-r--r--compiler/rustc_hir/src/stable_hash_impls.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_hir/src/stable_hash_impls.rs b/compiler/rustc_hir/src/stable_hash_impls.rs
index e7e676fe147..a344af1237f 100644
--- a/compiler/rustc_hir/src/stable_hash_impls.rs
+++ b/compiler/rustc_hir/src/stable_hash_impls.rs
@@ -53,11 +53,11 @@ impl<HirCtx: crate::HashStableContext> ToStableHashKey<HirCtx> for TraitItemId {
 }
 
 impl<HirCtx: crate::HashStableContext> ToStableHashKey<HirCtx> for ImplItemId {
-    type KeyType = (DefPathHash, ItemLocalId);
+    type KeyType = DefPathHash;
 
     #[inline]
-    fn to_stable_hash_key(&self, hcx: &HirCtx) -> (DefPathHash, ItemLocalId) {
-        self.hir_id.to_stable_hash_key(hcx)
+    fn to_stable_hash_key(&self, hcx: &HirCtx) -> DefPathHash {
+        hcx.local_def_path_hash(self.def_id)
     }
 }
 
@@ -103,7 +103,7 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ForeignItemId {
 
 impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ImplItemId {
     fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
-        hcx.hash_reference_to_item(self.hir_id, hasher)
+        hcx.hash_reference_to_item(self.hir_id(), hasher)
     }
 }
 
@@ -154,7 +154,7 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for TraitItem<'_> {
 impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ImplItem<'_> {
     fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
         let ImplItem {
-            hir_id: _,
+            def_id: _,
             ident,
             ref vis,
             defaultness,