| 1 |
error[E0658]: yield syntax is experimental |
| 2 |
--> tests/ui/yield_in_nested_fn.rs:6:13 |
| 3 |
| |
| 4 |
6 | yield "hello"; |
| 5 |
| ^^^^^^^^^^^^^ |
| 6 |
| |
| 7 |
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information |
| 8 |
|
| 9 |
error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks |
| 10 |
--> tests/ui/yield_in_nested_fn.rs:6:13 |
| 11 |
| |
| 12 |
6 | yield "hello"; |
| 13 |
| ^^^^^^^^^^^^^ |
| 14 |
| |
| 15 |
help: use `#[coroutine]` to make this closure a coroutine |
| 16 |
| |
| 17 |
5 | #[coroutine] fn foo() { |
| 18 |
| ++++++++++++ |
| 19 |
|
| 20 |
error[E0627]: yield expression outside of coroutine literal |
| 21 |
--> tests/ui/yield_in_nested_fn.rs:6:13 |
| 22 |
| |
| 23 |
6 | yield "hello"; |
| 24 |
| ^^^^^^^^^^^^^ |