1
Fork 0

Error on using yield without also using #[coroutine] on the closure

And suggest adding the `#[coroutine]` to the closure
This commit is contained in:
Oli Scherer 2024-04-11 13:15:34 +00:00
parent a589632dad
commit aef0f4024a
279 changed files with 1290 additions and 886 deletions

View file

@ -11,7 +11,7 @@
use std::ops::Coroutine;
fn coroutine_test() -> impl Coroutine<Yield = i32, Return = ()> {
|| {
#[coroutine] || {
yield 0;
let s = String::from("foo");
yield 1;