rust/tests/ui/coroutine/yield-in-const.rs
Oli Scherer aef0f4024a Error on using yield without also using #[coroutine] on the closure
And suggest adding the `#[coroutine]` to the closure
2024-04-24 08:05:29 +00:00

7 lines
147 B
Rust

#![feature(coroutines)]
const A: u8 = { yield 3u8; 3u8};
//~^ ERROR yield expression outside
//~| ERROR `yield` can only be used in
fn main() {}