From 6b5ebc340d0408866e46238d8a1612189c7a4b38 Mon Sep 17 00:00:00 2001 From: Sebastien Tardif Date: Tue, 23 Jun 2026 22:32:39 -0700 Subject: [PATCH] rustc_public: lower CoroutineClosure types to SMIR RigidTy::CoroutineClosure and coroutine_closure_def already exist; finish the stable conversion path instead of todo! on async closure types. Signed-off-by: Sebastien Tardif --- compiler/rustc_public/src/unstable/convert/stable/ty.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_public/src/unstable/convert/stable/ty.rs b/compiler/rustc_public/src/unstable/convert/stable/ty.rs index f9ee9f4ee779e..5f1dfd184d336 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/ty.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/ty.rs @@ -478,7 +478,12 @@ impl<'tcx> Stable<'tcx> for ty::TyKind<'tcx> { tables.closure_def(*def_id), generic_args.stable(tables, cx), )), - ty::CoroutineClosure(..) => todo!("FIXME(async_closures): Lower these to SMIR"), + ty::CoroutineClosure(def_id, generic_args) => { + TyKind::RigidTy(RigidTy::CoroutineClosure( + tables.coroutine_closure_def(*def_id), + generic_args.stable(tables, cx), + )) + } ty::Coroutine(def_id, generic_args) => TyKind::RigidTy(RigidTy::Coroutine( tables.coroutine_def(*def_id), generic_args.stable(tables, cx),