File tree 2 files changed +7
-7
lines changed
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> {
40
40
}
41
41
}
42
42
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
-
50
43
fn hash_reference_to_item ( & mut self , id : hir:: HirId , hasher : & mut StableHasher ) {
51
44
let hcx = self ;
52
45
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for BodyId {
36
36
}
37
37
}
38
38
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
+
39
46
impl < HirCtx : crate :: HashStableContext > HashStable < HirCtx > for ItemId {
40
47
fn hash_stable ( & self , hcx : & mut HirCtx , hasher : & mut StableHasher ) {
41
48
hcx. hash_reference_to_item ( self . id , hasher)
You can’t perform that action at this time.
0 commit comments