Update crates/hir-ty/src/infer/expr.rs · rust-lang/rust@425ed6a (original) (raw)
File tree
1 file changed
lines changed
- src/tools/rust-analyzer/crates/hir-ty/src/infer
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -933,6 +933,7 @@ impl InferenceContext<'_> { | ||
933 | 933 | let prev_ret_coercion = |
934 | 934 | mem::replace(&mut self.return_coercion, Some(CoerceMany::new(ret_ty.clone()))); |
935 | 935 | |
936 | +// FIXME: We should handle async blocks like we handle closures | |
936 | 937 | let expected = &Expectation::has_type(ret_ty); |
937 | 938 | let (_, inner_ty) = self.with_breakable_ctx(BreakableKind::Border, None, None, |this |
938 | 939 | let ty = this.infer_block(tgt_expr, *id, statements, *tail, None, expected); |