@@ -74,6 +74,7 @@ for ty::subst::UnpackedKind<'gcx> {
74
74
match self {
75
75
ty:: subst:: UnpackedKind :: Lifetime ( lt) => lt. hash_stable ( hcx, hasher) ,
76
76
ty:: subst:: UnpackedKind :: Type ( ty) => ty. hash_stable ( hcx, hasher) ,
77
+ ty:: subst:: UnpackedKind :: Const ( ct) => ct. hash_stable ( hcx, hasher) ,
77
78
}
78
79
}
79
80
}
@@ -134,6 +135,15 @@ impl<'a> HashStable<StableHashingContext<'a>> for ty::RegionVid {
134
135
}
135
136
}
136
137
138
+ impl < ' gcx , ' tcx > HashStable < StableHashingContext < ' gcx > > for ty:: ConstVid < ' tcx > {
139
+ #[ inline]
140
+ fn hash_stable < W : StableHasherResult > ( & self ,
141
+ hcx : & mut StableHashingContext < ' gcx > ,
142
+ hasher : & mut StableHasher < W > ) {
143
+ self . index . hash_stable ( hcx, hasher) ;
144
+ }
145
+ }
146
+
137
147
impl < ' gcx > HashStable < StableHashingContext < ' gcx > > for ty:: BoundVar {
138
148
#[ inline]
139
149
fn hash_stable < W : StableHasherResult > ( & self ,
@@ -297,6 +307,14 @@ impl<'a> HashStable<StableHashingContext<'a>> for ty::VariantFlags {
297
307
}
298
308
}
299
309
310
+ impl_stable_hash_for ! (
311
+ impl <' tcx> for enum ty:: InferConst <' tcx> [ ty:: InferConst ] {
312
+ Var ( vid) ,
313
+ Fresh ( i) ,
314
+ Canonical ( debruijn, var) ,
315
+ }
316
+ ) ;
317
+
300
318
impl_stable_hash_for ! ( enum ty:: VariantDiscr {
301
319
Explicit ( def_id) ,
302
320
Relative ( distance)
@@ -310,11 +328,14 @@ impl_stable_hash_for!(struct ty::FieldDef {
310
328
311
329
impl_stable_hash_for ! (
312
330
impl <' tcx> for enum mir:: interpret:: ConstValue <' tcx> [ mir:: interpret:: ConstValue ] {
331
+ Param ( param) ,
332
+ Infer ( infer) ,
313
333
Scalar ( val) ,
314
334
Slice ( a, b) ,
315
335
ByRef ( ptr, alloc) ,
316
336
}
317
337
) ;
338
+
318
339
impl_stable_hash_for ! ( struct crate :: mir:: interpret:: RawConst <' tcx> {
319
340
alloc_id,
320
341
ty,
@@ -518,6 +539,7 @@ impl_stable_hash_for!(struct ty::GenericParamDef {
518
539
impl_stable_hash_for ! ( enum ty:: GenericParamDefKind {
519
540
Lifetime ,
520
541
Type { has_default, object_lifetime_default, synthetic } ,
542
+ Const ,
521
543
} ) ;
522
544
523
545
impl_stable_hash_for ! (
@@ -736,6 +758,11 @@ for ty::FloatVid
736
758
}
737
759
}
738
760
761
+ impl_stable_hash_for ! ( struct ty:: ParamConst {
762
+ index,
763
+ name
764
+ } ) ;
765
+
739
766
impl_stable_hash_for ! ( struct ty:: ParamTy {
740
767
idx,
741
768
name
0 commit comments