• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0658]: yield syntax is experimental
2 --> tests/ui/yield_in_closure.rs:7:17
3  |
47 |                 yield v;
5  |                 ^^^^^^^
6  |
7  = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
8
9error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
10 --> tests/ui/yield_in_closure.rs:7:17
11  |
127 |                 yield v;
13  |                 ^^^^^^^
14  |
15help: use `#[coroutine]` to make this closure a coroutine
16  |
176 |             .and_then(#[coroutine] |v| {
18  |                       ++++++++++++
19
20error[E0277]: expected a `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
21 --> tests/ui/yield_in_closure.rs:6:23
22  |
236 |               .and_then(|v| {
24  |  ______________--------_^
25  | |              |
26  | |              required by a bound introduced by this call
277 | |                 yield v;
288 | |                 Ok(())
299 | |             });
30  | |_____________^ expected an `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
31  |
32  = help: the trait `FnOnce(&str)` is not implemented for `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
33note: required by a bound in `Result::<T, E>::and_then`
34 --> $RUST/core/src/result.rs
35  |
36  |     pub fn and_then<U, F: FnOnce(T) -> Result<U, E>>(self, op: F) -> Result<U, E> {
37  |                           ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Result::<T, E>::and_then`
38