Debian Codegraph @

tests/ui/yield_in_closure.stderr

raw
1 error[E0658]: yield syntax is experimental
2 --> tests/ui/yield_in_closure.rs:7:17
3 |
4 7 | yield v;
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_closure.rs:7:17
11 |
12 7 | yield v;
13 | ^^^^^^^
14 |
15 help: use `#[coroutine]` to make this closure a coroutine
16 |
17 6 | .and_then(#[coroutine] |v| {
18 | ++++++++++++
19
20 error[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 |
23 6 | .and_then(|v| {
24 | ______________--------_^
25 | | |
26 | | required by a bound introduced by this call
27 7 | | yield v;
28 8 | | Ok(())
29 9 | | });
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}`
33 note: 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`