-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Labels
[C] Feature / EnhancementA new feature request or enhancement to an existing feature.A new feature request or enhancement to an existing feature.[E] Unsupported ConstructAdd support to an unsupported constructAdd support to an unsupported construct
Description
Requested feature: Add support for coroutine closures
Use case: async closures
Link to relevant documentation (Rust reference, Nomicon, RFC): RFC, Addition to StableMIR
Test case:
(Test taken from https://github.com/rust-lang/rust/blob/master/tests/codegen/async-closure-debug.rs)
fn async_closure_test(upvar: &str) -> impl AsyncFn() + '_ {
async move || {
let hello = String::from("hello");
println!("{hello}, {upvar}");
}
}
fn main() {
let _async_closure = async_closure_test("world");
}
Metadata
Metadata
Assignees
Labels
[C] Feature / EnhancementA new feature request or enhancement to an existing feature.A new feature request or enhancement to an existing feature.[E] Unsupported ConstructAdd support to an unsupported constructAdd support to an unsupported construct