Skip to content

Commit 4b53823

Browse files
committed
ty::CoroutineClosure is more a closure than a coroutine
1 parent 7618355 commit 4b53823

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎compiler/rustc_middle/src/ty/sty.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,7 @@ impl<'tcx> Ty<'tcx> {
21902190
def.flags().contains(AdtFlags::IS_MAYBE_DANGLING)
21912191
|| def.flags().contains(AdtFlags::IS_MANUALLY_DROP)
21922192
}
2193-
ty::Coroutine(..) | ty::CoroutineClosure(..) => true,
2193+
ty::Coroutine(..) => true,
21942194
_ => false,
21952195
}
21962196
}

‎compiler/rustc_type_ir/src/ty_kind.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ pub enum TyKind<I: Interner> {
259259
/// `ClosureArgs` for more details.
260260
Closure(I::ClosureId, I::GenericArgs),
261261

262-
/// The anonymous type of a closure. Used to represent the type of `async |a| a`.
262+
/// The anonymous type of an async closure. Used to represent the type of `async |a| a`.
263+
///
264+
/// This type itself is not a coroutine, it just represents a closure that returns one.
263265
///
264266
/// Coroutine-closure args contain both the - potentially instantiated - generic
265267
/// parameters of its parent and some synthetic parameters. See the documentation

0 commit comments

Comments
 (0)