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
752af44fc4
commit
df0639b6e1
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![feature(core_intrinsics, coroutines, coroutine_trait, is_sorted)]
|
#![feature(core_intrinsics, coroutines, coroutine_trait, is_sorted, stmt_expr_attributes)]
|
||||||
|
|
||||||
#[cfg(feature="master")]
|
#[cfg(feature="master")]
|
||||||
#[cfg(target_arch="x86_64")]
|
#[cfg(target_arch="x86_64")]
|
||||||
|
@ -103,7 +103,7 @@ fn main() {
|
||||||
test_simd();
|
test_simd();
|
||||||
}
|
}
|
||||||
|
|
||||||
Box::pin(move |mut _task_context| {
|
Box::pin(#[coroutine] move |mut _task_context| {
|
||||||
yield ();
|
yield ();
|
||||||
}).as_mut().resume(0);
|
}).as_mut().resume(0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue