We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f613c48 commit ced971eCopy full SHA for ced971e
crates/ra_hir/src/ty/infer/unify.rs
@@ -56,7 +56,12 @@ where
56
self.var_stack.pop();
57
result
58
} else {
59
- let free_var = InferTy::TypeVar(self.ctx.var_unification_table.find(inner));
+ let root = self.ctx.var_unification_table.find(inner);
60
+ let free_var = match tv {
61
+ InferTy::TypeVar(_) => InferTy::TypeVar(root),
62
+ InferTy::IntVar(_) => InferTy::IntVar(root),
63
+ InferTy::FloatVar(_) => InferTy::FloatVar(root),
64
+ };
65
let position = self.add(free_var);
66
Ty::Bound(position as u32)
67
}
0 commit comments