diff options
Diffstat (limited to 'crates/hir_ty/src/infer/unify.rs')
-rw-r--r-- | crates/hir_ty/src/infer/unify.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs index b481aa1b3..99a89a7f3 100644 --- a/crates/hir_ty/src/infer/unify.rs +++ b/crates/hir_ty/src/infer/unify.rs | |||
@@ -68,7 +68,7 @@ impl<'a, 'b> Canonicalizer<'a, 'b> { | |||
68 | } else { | 68 | } else { |
69 | let root = self.ctx.table.var_unification_table.find(inner); | 69 | let root = self.ctx.table.var_unification_table.find(inner); |
70 | let position = self.add(InferenceVar::from_inner(root), kind); | 70 | let position = self.add(InferenceVar::from_inner(root), kind); |
71 | Ty::Bound(BoundVar::new(binders, position)) | 71 | Ty::BoundVar(BoundVar::new(binders, position)) |
72 | } | 72 | } |
73 | } | 73 | } |
74 | _ => ty, | 74 | _ => ty, |
@@ -110,7 +110,7 @@ impl<T> Canonicalized<T> { | |||
110 | pub(super) fn decanonicalize_ty(&self, mut ty: Ty) -> Ty { | 110 | pub(super) fn decanonicalize_ty(&self, mut ty: Ty) -> Ty { |
111 | ty.walk_mut_binders( | 111 | ty.walk_mut_binders( |
112 | &mut |ty, binders| { | 112 | &mut |ty, binders| { |
113 | if let &mut Ty::Bound(bound) = ty { | 113 | if let &mut Ty::BoundVar(bound) = ty { |
114 | if bound.debruijn >= binders { | 114 | if bound.debruijn >= binders { |
115 | let (v, k) = self.free_vars[bound.index]; | 115 | let (v, k) = self.free_vars[bound.index]; |
116 | *ty = Ty::InferenceVar(v, k); | 116 | *ty = Ty::InferenceVar(v, k); |
@@ -168,7 +168,7 @@ pub(crate) fn unify(tys: &Canonical<(Ty, Ty)>) -> Option<Substs> { | |||
168 | // (kind of hacky) | 168 | // (kind of hacky) |
169 | for (i, var) in vars.iter().enumerate() { | 169 | for (i, var) in vars.iter().enumerate() { |
170 | if &*table.resolve_ty_shallow(var) == var { | 170 | if &*table.resolve_ty_shallow(var) == var { |
171 | table.unify(var, &Ty::Bound(BoundVar::new(DebruijnIndex::INNERMOST, i))); | 171 | table.unify(var, &Ty::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, i))); |
172 | } | 172 | } |
173 | } | 173 | } |
174 | Some( | 174 | Some( |