@@ -73,34 +73,6 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for ty::subst::GenericArg<'t
73
73
}
74
74
}
75
75
76
- impl < ' a , ' tcx > HashStable < StableHashingContext < ' a > > for ty:: subst:: GenericArgKind < ' tcx > {
77
- fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
78
- match self {
79
- // WARNING: We dedup cache the `HashStable` results for `List`
80
- // while ignoring types and freely transmute
81
- // between `List<Ty<'tcx>>` and `List<GenericArg<'tcx>>`.
82
- // See `fn mk_type_list` for more details.
83
- //
84
- // We therefore hash types without adding a hash for their discriminant.
85
- //
86
- // In order to make it very unlikely for the sequence of bytes being hashed for
87
- // a `GenericArgKind::Type` to be the same as the sequence of bytes being
88
- // hashed for one of the other variants, we hash some very high number instead
89
- // of their actual discriminant since `TyKind` should never start with anything
90
- // that high.
91
- ty:: subst:: GenericArgKind :: Type ( ty) => ty. hash_stable ( hcx, hasher) ,
92
- ty:: subst:: GenericArgKind :: Const ( ct) => {
93
- 0xF3u8 . hash_stable ( hcx, hasher) ;
94
- ct. hash_stable ( hcx, hasher) ;
95
- }
96
- ty:: subst:: GenericArgKind :: Lifetime ( lt) => {
97
- 0xF5u8 . hash_stable ( hcx, hasher) ;
98
- lt. hash_stable ( hcx, hasher) ;
99
- }
100
- }
101
- }
102
- }
103
-
104
76
// AllocIds get resolved to whatever they point to (to be stable)
105
77
impl < ' a > HashStable < StableHashingContext < ' a > > for mir:: interpret:: AllocId {
106
78
fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
0 commit comments