aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r--crates/ra_hir/src/ty.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs
index cdecbd064..3e1a4f02e 100644
--- a/crates/ra_hir/src/ty.rs
+++ b/crates/ra_hir/src/ty.rs
@@ -877,6 +877,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
877 fn infer_pat(&mut self, pat: PatId, expected: &Expectation) -> Ty { 877 fn infer_pat(&mut self, pat: PatId, expected: &Expectation) -> Ty {
878 let body = Arc::clone(&self.body); // avoid borrow checker problem 878 let body = Arc::clone(&self.body); // avoid borrow checker problem
879 879
880 // FIXME: we can do some inference even if the expected ty isnt already
881 // of the right form
880 let ty = match (&body[pat], &expected.ty) { 882 let ty = match (&body[pat], &expected.ty) {
881 (Pat::Tuple(ref args), &Ty::Tuple(ref tuple_args)) 883 (Pat::Tuple(ref args), &Ty::Tuple(ref tuple_args))
882 if args.len() == tuple_args.len() => 884 if args.len() == tuple_args.len() =>