aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-02-02 12:04:22 +0000
committerFlorian Diebold <[email protected]>2020-02-07 17:28:10 +0000
commit3397ca679fb0156c9f102ab82354e2bcef5f4dd1 (patch)
treee61d0eba1a918b9e6802baf6dbeb99f3d92afd82 /crates/ra_hir_ty/src/infer.rs
parentc6654fd4a70ef149a842e42dc9ef86838148fbe7 (diff)
Fix APIT some more
Diffstat (limited to 'crates/ra_hir_ty/src/infer.rs')
-rw-r--r--crates/ra_hir_ty/src/infer.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs
index 0d65984ee..8d5b7c943 100644
--- a/crates/ra_hir_ty/src/infer.rs
+++ b/crates/ra_hir_ty/src/infer.rs
@@ -479,8 +479,11 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
479 479
480 fn collect_fn(&mut self, data: &FunctionData) { 480 fn collect_fn(&mut self, data: &FunctionData) {
481 let body = Arc::clone(&self.body); // avoid borrow checker problem 481 let body = Arc::clone(&self.body); // avoid borrow checker problem
482 for (type_ref, pat) in data.params.iter().zip(body.params.iter()) { 482 let ctx = crate::lower::TyLoweringContext::new(self.db, &self.resolver).with_impl_trait_mode(ImplTraitLoweringMode::Param);
483 let ty = self.make_ty_with_mode(type_ref, ImplTraitLoweringMode::Param); 483 let param_tys = data.params.iter().map(|type_ref| Ty::from_hir(&ctx, type_ref)).collect::<Vec<_>>();
484 for (ty, pat) in param_tys.into_iter().zip(body.params.iter()) {
485 let ty = self.insert_type_vars(ty);
486 let ty = self.normalize_associated_types_in(ty);
484 487
485 self.infer_pat(*pat, &ty, BindingMode::default()); 488 self.infer_pat(*pat, &ty, BindingMode::default());
486 } 489 }