rust/tests/ui/lint/must_not_suspend/tuple-mismatch.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

11 lines
201 B
Rust

#![feature(coroutines, stmt_expr_attributes)]
fn main() {
let _coroutine = #[coroutine]
|| {
yield ((), ((), ()));
yield ((), ());
//~^ ERROR mismatched types
};
}