rust/tests/ui/coroutine/gen_block_is_no_future.rs

9 lines
179 B
Rust

//@compile-flags: --edition 2024 -Zunstable-options
#![feature(gen_blocks)]
fn foo() -> impl std::future::Future { //~ ERROR is not a future
gen { yield 42 }
}
fn main() {}