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
|
@ -1,6 +1,7 @@
|
|||
#![feature(
|
||||
core_intrinsics,
|
||||
coroutines,
|
||||
stmt_expr_attributes,
|
||||
coroutine_trait,
|
||||
is_sorted,
|
||||
repr_simd,
|
||||
|
@ -123,9 +124,12 @@ fn main() {
|
|||
test_simd();
|
||||
}
|
||||
|
||||
Box::pin(move |mut _task_context| {
|
||||
yield ();
|
||||
})
|
||||
Box::pin(
|
||||
#[coroutine]
|
||||
move |mut _task_context| {
|
||||
yield ();
|
||||
},
|
||||
)
|
||||
.as_mut()
|
||||
.resume(0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue