File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,6 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
4040 }
4141 }
4242
43- // The following implementations of HashStable for `ItemId`, `TraitItemId`, and
44- // `ImplItemId` deserve special attention. Normally we do not hash `NodeId`s within
45- // the HIR, since they just signify a HIR nodes own path. But `ItemId` et al
46- // are used when another item in the HIR is *referenced* and we certainly
47- // want to pick up on a reference changing its target, so we hash the NodeIds
48- // in "DefPath Mode".
49-
5043 fn hash_reference_to_item ( & mut self , id : hir:: HirId , hasher : & mut StableHasher ) {
5144 let hcx = self ;
5245
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for BodyId {
3636 }
3737}
3838
39+ // The following implementations of HashStable for `ItemId`, `TraitItemId`, and
40+ // `ImplItemId` deserve special attention. Normally we do not hash `NodeId`s within
41+ // the HIR, since they just signify a HIR nodes own path. But `ItemId` et al
42+ // are used when another item in the HIR is *referenced* and we certainly
43+ // want to pick up on a reference changing its target, so we hash the NodeIds
44+ // in "DefPath Mode".
45+
3946impl < HirCtx : crate :: HashStableContext > HashStable < HirCtx > for ItemId {
4047 fn hash_stable ( & self , hcx : & mut HirCtx , hasher : & mut StableHasher ) {
4148 hcx. hash_reference_to_item ( self . id , hasher)
You can’t perform that action at this time.
0 commit comments