rust/tests/source/immovable_coroutines.rs
Oli Scherer 20e40d5efe 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

9 lines
115 B
Rust

#![feature(coroutines)]
unsafe fn foo() {
let mut ga = #[coroutine]
static || {
yield 1;
};
}