mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Update crates/hir-ty/src/infer/expr.rs
This commit is contained in:
parent
da3fa2b7f0
commit
ac3b2d4b54
1 changed files with 1 additions and 0 deletions
|
@ -933,6 +933,7 @@ impl InferenceContext<'_> {
|
||||||
let prev_ret_coercion =
|
let prev_ret_coercion =
|
||||||
mem::replace(&mut self.return_coercion, Some(CoerceMany::new(ret_ty.clone())));
|
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 expected = &Expectation::has_type(ret_ty);
|
||||||
let (_, inner_ty) = self.with_breakable_ctx(BreakableKind::Border, None, None, |this| {
|
let (_, inner_ty) = self.with_breakable_ctx(BreakableKind::Border, None, None, |this| {
|
||||||
let ty = this.infer_block(tgt_expr, *id, statements, *tail, None, expected);
|
let ty = this.infer_block(tgt_expr, *id, statements, *tail, None, expected);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue