aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer/pat.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-12-01 19:30:28 +0000
committerFlorian Diebold <[email protected]>2019-12-02 18:33:13 +0000
commit599dab59824b164b1c24e2e51adeae1ac1307964 (patch)
tree3a31914d0647dd18f6e0026681ca1aed5a0e262a /crates/ra_hir_ty/src/infer/pat.rs
parentcbf262a1bc72f10dc93a4993da0012d3b0abb56f (diff)
Extract unification code to unify module
Diffstat (limited to 'crates/ra_hir_ty/src/infer/pat.rs')
-rw-r--r--crates/ra_hir_ty/src/infer/pat.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/infer/pat.rs b/crates/ra_hir_ty/src/infer/pat.rs
index 1ebb36239..a14662884 100644
--- a/crates/ra_hir_ty/src/infer/pat.rs
+++ b/crates/ra_hir_ty/src/infer/pat.rs
@@ -170,7 +170,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
170 } 170 }
171 BindingMode::Move => inner_ty.clone(), 171 BindingMode::Move => inner_ty.clone(),
172 }; 172 };
173 let bound_ty = self.resolve_ty_as_possible(&mut vec![], bound_ty); 173 let bound_ty = self.resolve_ty_as_possible(bound_ty);
174 self.write_pat_ty(pat, bound_ty); 174 self.write_pat_ty(pat, bound_ty);
175 return inner_ty; 175 return inner_ty;
176 } 176 }
@@ -179,7 +179,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
179 // use a new type variable if we got Ty::Unknown here 179 // use a new type variable if we got Ty::Unknown here
180 let ty = self.insert_type_vars_shallow(ty); 180 let ty = self.insert_type_vars_shallow(ty);
181 self.unify(&ty, expected); 181 self.unify(&ty, expected);
182 let ty = self.resolve_ty_as_possible(&mut vec![], ty); 182 let ty = self.resolve_ty_as_possible(ty);
183 self.write_pat_ty(pat, ty.clone()); 183 self.write_pat_ty(pat, ty.clone());
184 ty 184 ty
185 } 185 }