Error on using yield
without also using #[coroutine]
on the closure
And suggest adding the `#[coroutine]` to the closure
This commit is contained in:
parent
a589632dad
commit
aef0f4024a
279 changed files with 1290 additions and 886 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue