1
Fork 0

Support async gen fn

This commit is contained in:
Michael Goulet 2023-12-05 21:45:01 +00:00
parent 2806c2df7b
commit a208bae00e
16 changed files with 115 additions and 104 deletions

View file

@ -1,11 +1,13 @@
// edition: 2024
// compile-flags: -Zunstable-options
#![feature(gen_blocks)]
// check-pass
// async generators are not yet supported, so this test makes sure they make some kind of reasonable
// error.
#![feature(gen_blocks, async_iterator)]
async gen fn foo() {}
//~^ `async gen` functions are not supported
async fn bar() {}
async gen fn foo() {
yield bar().await;
}
fn main() {}