aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-24 16:06:58 +0000
committerGitHub <[email protected]>2019-11-24 16:06:58 +0000
commitac9ba5eb32073c16608acaa04324e7dc46d303d6 (patch)
treea88c9a76a24787c1eac988f318e938406a288677 /crates/ra_hir/src/ty
parentb0581c2403f49c68738c039065fa2cfc41345738 (diff)
parent434f108adad75b7c5e25db745a9f9fefa5cdaa31 (diff)
Merge #2387
2387: Simplify r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r--crates/ra_hir/src/ty/infer.rs4
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> {