From 434f108adad75b7c5e25db745a9f9fefa5cdaa31 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Nov 2019 18:48:29 +0300 Subject: Simplify --- crates/ra_hir/src/ty/infer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/ty/infer.rs') 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> { fn collect_fn(&mut self, data: &FunctionData) { let body = Arc::clone(&self.body); // avoid borrow checker problem - for (type_ref, pat) in data.params.iter().zip(body.params()) { + for (type_ref, pat) in data.params.iter().zip(body.params.iter()) { let ty = self.make_ty(type_ref); self.infer_pat(*pat, &ty, BindingMode::default()); @@ -574,7 +574,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { } fn infer_body(&mut self) { - self.infer_expr(self.body.body_expr(), &Expectation::has_type(self.return_ty.clone())); + self.infer_expr(self.body.body_expr, &Expectation::has_type(self.return_ty.clone())); } fn resolve_into_iter_item(&self) -> Option { -- cgit v1.2.3