rust/tests/ui/coroutine/yield-in-static.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

8 lines
148 B
Rust

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