From aef0f4024aec24fd7e53dbc51883457e44fe17ce Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 11 Apr 2024 13:15:34 +0000 Subject: Error on using `yield` without also using `#[coroutine]` on the closure And suggest adding the `#[coroutine]` to the closure --- tests/codegen/coroutine-debug.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/codegen/coroutine-debug.rs') diff --git a/tests/codegen/coroutine-debug.rs b/tests/codegen/coroutine-debug.rs index 7eaee669559..914515f58b8 100644 --- a/tests/codegen/coroutine-debug.rs +++ b/tests/codegen/coroutine-debug.rs @@ -11,7 +11,7 @@ use std::ops::Coroutine; fn coroutine_test() -> impl Coroutine { - || { + #[coroutine] || { yield 0; let s = String::from("foo"); yield 1; -- cgit 1.4.1-3-g733a5