aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-20 17:29:11 +0000
committerGitHub <[email protected]>2019-12-20 17:29:11 +0000
commit1d7931e5ffeb2d65ebcc14a63da1b84cc131bfb8 (patch)
tree2b96a667cd1d7bee5ec41abe38d777bc181b674d /crates/ra_hir_ty/src/infer.rs
parent99d6f544f2a590d3feef47ce62d5cd9a8b463a47 (diff)
parent9c3f00a90651998c2cd4151f43f17cd92ef8eef1 (diff)
Merge #2618
2618: Fix coercion of last expression in function body r=flodiebold a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src/infer.rs')
-rw-r--r--crates/ra_hir_ty/src/infer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs
index 9f2ed830e..e97b81473 100644
--- a/crates/ra_hir_ty/src/infer.rs
+++ b/crates/ra_hir_ty/src/infer.rs
@@ -460,7 +460,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
460 } 460 }
461 461
462 fn infer_body(&mut self) { 462 fn infer_body(&mut self) {
463 self.infer_expr(self.body.body_expr, &Expectation::has_type(self.return_ty.clone())); 463 self.infer_expr_coerce(self.body.body_expr, &Expectation::has_type(self.return_ty.clone()));
464 } 464 }
465 465
466 fn resolve_into_iter_item(&self) -> Option<TypeAliasId> { 466 fn resolve_into_iter_item(&self) -> Option<TypeAliasId> {