diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 471bdc387..2e744e5ec 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -565,7 +565,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
565 | 565 | ||
566 | fn collect_fn(&mut self, data: &FunctionData) { | 566 | fn collect_fn(&mut self, data: &FunctionData) { |
567 | let body = Arc::clone(&self.body); // avoid borrow checker problem | 567 | let body = Arc::clone(&self.body); // avoid borrow checker problem |
568 | for (type_ref, pat) in data.params.iter().zip(body.params()) { | 568 | for (type_ref, pat) in data.params.iter().zip(body.params.iter()) { |
569 | let ty = self.make_ty(type_ref); | 569 | let ty = self.make_ty(type_ref); |
570 | 570 | ||
571 | self.infer_pat(*pat, &ty, BindingMode::default()); | 571 | self.infer_pat(*pat, &ty, BindingMode::default()); |
@@ -574,7 +574,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
574 | } | 574 | } |
575 | 575 | ||
576 | fn infer_body(&mut self) { | 576 | fn infer_body(&mut self) { |
577 | self.infer_expr(self.body.body_expr(), &Expectation::has_type(self.return_ty.clone())); | 577 | self.infer_expr(self.body.body_expr, &Expectation::has_type(self.return_ty.clone())); |
578 | } | 578 | } |
579 | 579 | ||
580 | fn resolve_into_iter_item(&self) -> Option<TypeAlias> { | 580 | fn resolve_into_iter_item(&self) -> Option<TypeAlias> { |