}
}
- // The following implementations of HashStable for `ItemId`, `TraitItemId`, and
- // `ImplItemId` deserve special attention. Normally we do not hash `NodeId`s within
- // the HIR, since they just signify a HIR nodes own path. But `ItemId` et al
- // are used when another item in the HIR is *referenced* and we certainly
- // want to pick up on a reference changing its target, so we hash the NodeIds
- // in "DefPath Mode".
-
fn hash_reference_to_item(&mut self, id: hir::HirId, hasher: &mut StableHasher) {
let hcx = self;
}
}
+// The following implementations of HashStable for `ItemId`, `TraitItemId`, and
+// `ImplItemId` deserve special attention. Normally we do not hash `NodeId`s within
+// the HIR, since they just signify a HIR nodes own path. But `ItemId` et al
+// are used when another item in the HIR is *referenced* and we certainly
+// want to pick up on a reference changing its target, so we hash the NodeIds
+// in "DefPath Mode".
+
impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ItemId {
fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
hcx.hash_reference_to_item(self.id, hasher)