rust/tests/ui/coroutine/async_gen_fn.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
304 B
Rust
Raw Normal View History

2023-12-07 11:39:02 -06:00
// revisions: e2024 none
//[e2024] compile-flags: --edition 2024 -Zunstable-options
2023-11-29 18:59:06 -06:00
2023-12-07 11:39:02 -06:00
async gen fn foo() {}
//[none]~^ ERROR: `async fn` is not permitted in Rust 2015
//[none]~| ERROR: expected one of `extern`, `fn`, or `unsafe`, found `gen`
//[e2024]~^^^ ERROR: gen blocks are experimental
2023-11-29 18:59:06 -06:00
fn main() {}