From ac3b2d4b54f7b44dc828a752c22e961842ce68bc Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 23 May 2024 10:36:57 +0200 Subject: [PATCH] Update crates/hir-ty/src/infer/expr.rs --- crates/hir-ty/src/infer/expr.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/hir-ty/src/infer/expr.rs b/crates/hir-ty/src/infer/expr.rs index bccad751fc..4c12786362 100644 --- a/crates/hir-ty/src/infer/expr.rs +++ b/crates/hir-ty/src/infer/expr.rs @@ -933,6 +933,7 @@ impl InferenceContext<'_> { let prev_ret_coercion = mem::replace(&mut self.return_coercion, Some(CoerceMany::new(ret_ty.clone()))); + // FIXME: We should handle async blocks like we handle closures let expected = &Expectation::has_type(ret_ty); let (_, inner_ty) = self.with_breakable_ctx(BreakableKind::Border, None, None, |this| { let ty = this.infer_block(tgt_expr, *id, statements, *tail, None, expected);