File: yield_in_nested_fn.stderr

package info (click to toggle)
rust-async-stream 0.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 236 kB
  • sloc: makefile: 2
file content (24 lines) | stat: -rw-r--r-- 727 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
error[E0658]: yield syntax is experimental
 --> tests/ui/yield_in_nested_fn.rs:6:13
  |
6 |             yield "hello";
  |             ^^^^^^^^^^^^^
  |
  = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information

error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
 --> tests/ui/yield_in_nested_fn.rs:6:13
  |
6 |             yield "hello";
  |             ^^^^^^^^^^^^^
  |
help: use `#[coroutine]` to make this closure a coroutine
  |
5 |         #[coroutine] fn foo() {
  |         ++++++++++++

error[E0627]: yield expression outside of coroutine literal
 --> tests/ui/yield_in_nested_fn.rs:6:13
  |
6 |             yield "hello";
  |             ^^^^^^^^^^^^^