Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
| -rw-r--r-- | crates/hir_ty/src/infer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index 70bb56e02f..eca6b3a076 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs @@ -748,7 +748,7 @@ impl<'a> InferenceContext<'a> { self.infer_pat(*pat, &ty, BindingMode::default()); } let error_ty = &TypeRef::Error; - let return_ty = if data.is_async() { + let return_ty = if data.has_async_kw() { data.async_ret_type.as_deref().unwrap_or(error_ty) } else { &*data.ret_type |