Skip to content

Commit df0639b

Browse files
committed
Error on using yield without also using #[coroutine] on the closure
And suggest adding the `#[coroutine]` to the closure
1 parent 752af44 commit df0639b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example/std_example.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(internal_features)]
2-
#![feature(core_intrinsics, coroutines, coroutine_trait, is_sorted)]
2+
#![feature(core_intrinsics, coroutines, coroutine_trait, is_sorted, stmt_expr_attributes)]
33

44
#[cfg(feature="master")]
55
#[cfg(target_arch="x86_64")]
@@ -103,7 +103,7 @@ fn main() {
103103
test_simd();
104104
}
105105

106-
Box::pin(move |mut _task_context| {
106+
Box::pin(#[coroutine] move |mut _task_context| {
107107
yield ();
108108
}).as_mut().resume(0);
109109

0 commit comments

Comments
 (0)