Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/closure.rs')
-rw-r--r--crates/hir-ty/src/infer/closure.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-ty/src/infer/closure.rs b/crates/hir-ty/src/infer/closure.rs
index 118b9c0149..3bf0a00cd1 100644
--- a/crates/hir-ty/src/infer/closure.rs
+++ b/crates/hir-ty/src/infer/closure.rs
@@ -34,7 +34,7 @@ use crate::{
use super::{Expectation, InferenceContext};
impl InferenceContext<'_> {
- // This function handles both closures and generators.
+ // This function handles both closures and coroutines.
pub(super) fn deduce_closure_type_from_expectations(
&mut self,
closure_expr: ExprId,
@@ -50,8 +50,8 @@ impl InferenceContext<'_> {
// Deduction from where-clauses in scope, as well as fn-pointer coercion are handled here.
let _ = self.coerce(Some(closure_expr), closure_ty, &expected_ty);
- // Generators are not Fn* so return early.
- if matches!(closure_ty.kind(Interner), TyKind::Generator(..)) {
+ // Coroutines are not Fn* so return early.
+ if matches!(closure_ty.kind(Interner), TyKind::Coroutine(..)) {
return;
}