@@ -74,6 +74,7 @@ for ty::subst::UnpackedKind<'gcx> {
7474 match self {
7575 ty:: subst:: UnpackedKind :: Lifetime ( lt) => lt. hash_stable ( hcx, hasher) ,
7676 ty:: subst:: UnpackedKind :: Type ( ty) => ty. hash_stable ( hcx, hasher) ,
77+ ty:: subst:: UnpackedKind :: Const ( ct) => ct. hash_stable ( hcx, hasher) ,
7778 }
7879 }
7980}
@@ -134,6 +135,15 @@ impl<'a> HashStable<StableHashingContext<'a>> for ty::RegionVid {
134135 }
135136}
136137
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+
137147impl < ' gcx > HashStable < StableHashingContext < ' gcx > > for ty:: BoundVar {
138148 #[ inline]
139149 fn hash_stable < W : StableHasherResult > ( & self ,
@@ -297,6 +307,14 @@ impl<'a> HashStable<StableHashingContext<'a>> for ty::VariantFlags {
297307 }
298308}
299309
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+
300318impl_stable_hash_for ! ( enum ty:: VariantDiscr {
301319 Explicit ( def_id) ,
302320 Relative ( distance)
@@ -310,11 +328,14 @@ impl_stable_hash_for!(struct ty::FieldDef {
310328
311329impl_stable_hash_for ! (
312330 impl <' tcx> for enum mir:: interpret:: ConstValue <' tcx> [ mir:: interpret:: ConstValue ] {
331+ Param ( param) ,
332+ Infer ( infer) ,
313333 Scalar ( val) ,
314334 Slice ( a, b) ,
315335 ByRef ( ptr, alloc) ,
316336 }
317337) ;
338+
318339impl_stable_hash_for ! ( struct crate :: mir:: interpret:: RawConst <' tcx> {
319340 alloc_id,
320341 ty,
@@ -518,6 +539,7 @@ impl_stable_hash_for!(struct ty::GenericParamDef {
518539impl_stable_hash_for ! ( enum ty:: GenericParamDefKind {
519540 Lifetime ,
520541 Type { has_default, object_lifetime_default, synthetic } ,
542+ Const ,
521543} ) ;
522544
523545impl_stable_hash_for ! (
@@ -736,6 +758,11 @@ for ty::FloatVid
736758 }
737759}
738760
761+ impl_stable_hash_for ! ( struct ty:: ParamConst {
762+ index,
763+ name
764+ } ) ;
765+
739766impl_stable_hash_for ! ( struct ty:: ParamTy {
740767 idx,
741768 name
0 commit comments