Skip to content

Commit

Permalink
Update crates/hir-ty/src/infer/expr.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed May 23, 2024
1 parent 39a653f commit 425ed6a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/rust-analyzer/crates/hir-ty/src/infer/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 425ed6a

Please sign in to comment.