aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer/expr.rs
diff options
context:
space:
mode:
authorTomasKralCZ <[email protected]>2020-01-19 16:51:03 +0000
committerTomasKralCZ <[email protected]>2020-01-19 16:51:03 +0000
commit514df15d9e32e057ba23dda0d4f5c07e82e7ed23 (patch)
tree41e93f63182bae10a7325fc50220f67df79aaece /crates/ra_hir_ty/src/infer/expr.rs
parentc3b9a19eb72ae9542272ae7a22ac3fb57c75daca (diff)
parent3a7724e44181ccd5c248589538bd82458b5a9407 (diff)
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_hir_ty/src/infer/expr.rs')
-rw-r--r--crates/ra_hir_ty/src/infer/expr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs
index d6a17e469..31259a01d 100644
--- a/crates/ra_hir_ty/src/infer/expr.rs
+++ b/crates/ra_hir_ty/src/infer/expr.rs
@@ -386,11 +386,11 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
386 let lhs_ty = self.infer_expr(*lhs, &lhs_expectation); 386 let lhs_ty = self.infer_expr(*lhs, &lhs_expectation);
387 // FIXME: find implementation of trait corresponding to operation 387 // FIXME: find implementation of trait corresponding to operation
388 // symbol and resolve associated `Output` type 388 // symbol and resolve associated `Output` type
389 let rhs_expectation = op::binary_op_rhs_expectation(*op, lhs_ty); 389 let rhs_expectation = op::binary_op_rhs_expectation(*op, lhs_ty.clone());
390 let rhs_ty = self.infer_expr(*rhs, &Expectation::has_type(rhs_expectation)); 390 let rhs_ty = self.infer_expr(*rhs, &Expectation::has_type(rhs_expectation));
391 391
392 // FIXME: similar as above, return ty is often associated trait type 392 // FIXME: similar as above, return ty is often associated trait type
393 op::binary_op_return_ty(*op, rhs_ty) 393 op::binary_op_return_ty(*op, lhs_ty, rhs_ty)
394 } 394 }
395 _ => Ty::Unknown, 395 _ => Ty::Unknown,
396 }, 396 },