Skip to content

rustc_public: CoroutineClosure types todo! in stable SMIR conversion #575

Description

@SebTardif

Bug

compiler/rustc_public/src/unstable/convert/stable/ty.rs lowers ty::Closure and ty::Coroutine to RigidTy, but ty::CoroutineClosure hits:

ty::CoroutineClosure(..) => todo!("FIXME(async_closures): Lower these to SMIR"),

RigidTy::CoroutineClosure, CoroutineClosureDef, and tables.coroutine_closure_def already exist (MIR aggregate lowering and internal conversion already handle this variant).

Origin

Introduced when async closures landed as TyKind::CoroutineClosure:

rust-lang@c567edd

SMIR todo stub added in:

rust-lang@881b6b5

Impact

Any rustc_public/SMIR consumer that encounters an async closure type ICE via todo!.

Fix

Mirror the Closure/Coroutine arms using tables.coroutine_closure_def and RigidTy::CoroutineClosure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions