Fix HashStable implementation on InferTy

This commit is contained in:
Michael Goulet 2021-12-13 20:36:17 -08:00
parent 8f117a77d0
commit 75729afcc0
2 changed files with 18 additions and 0 deletions

View file

@ -559,6 +559,7 @@ impl<CTX> HashStable<CTX> for FloatTy {
impl<CTX> HashStable<CTX> for InferTy {
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
use InferTy::*;
discriminant(self).hash_stable(ctx, hasher);
match self {
TyVar(v) => v.as_u32().hash_stable(ctx, hasher),
IntVar(v) => v.index.hash_stable(ctx, hasher),