rust/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.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

13 lines
211 B
Rust

//@ edition:2021
//@ check-pass
#![feature(coroutines, stmt_expr_attributes)]
fn main() {
let x = &mut ();
|| {
let _c = #[coroutine]
|| yield *&mut *x;
|| _ = &mut *x;
};
}