diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-04-11 13:15:34 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-04-24 08:05:29 +0000 |
| commit | aef0f4024aec24fd7e53dbc51883457e44fe17ce (patch) | |
| tree | 25a26930a8cc3441951ba159f1a632092df41655 /src/tools/rustfmt/tests/source | |
| parent | a589632dad58c2669b7984019efb59917a16ac67 (diff) | |
| download | rust-aef0f4024aec24fd7e53dbc51883457e44fe17ce.tar.gz rust-aef0f4024aec24fd7e53dbc51883457e44fe17ce.zip | |
Error on using `yield` without also using `#[coroutine]` on the closure
And suggest adding the `#[coroutine]` to the closure
Diffstat (limited to 'src/tools/rustfmt/tests/source')
| -rw-r--r-- | src/tools/rustfmt/tests/source/immovable_coroutines.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/rustfmt/tests/source/immovable_coroutines.rs b/src/tools/rustfmt/tests/source/immovable_coroutines.rs index 3b94af0c96c..539049577a0 100644 --- a/src/tools/rustfmt/tests/source/immovable_coroutines.rs +++ b/src/tools/rustfmt/tests/source/immovable_coroutines.rs @@ -1,7 +1,8 @@ #![feature(coroutines)] unsafe fn foo() { - let mut ga = static || { + let mut ga = #[coroutine] + static || { yield 1; }; } |
