@@ -7,14 +7,20 @@ error[E0658]: yield syntax is experimental
7
7
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
8
8
9
9
error[E0277]: expected a `FnOnce<(&str,)>` closure, found `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]`
10
- --> tests/ui/yield_in_closure.rs:6:14
11
- |
12
- 6 | .and_then(|v| {
13
- | ^^^^^^^^ expected an `FnOnce<(&str,)>` closure, found `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]`
14
- |
15
- = help: the trait `FnOnce<(&str,)>` is not implemented for `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]`
10
+ --> tests/ui/yield_in_closure.rs:6:23
11
+ |
12
+ 6 | .and_then(|v| {
13
+ | ______________--------_^
14
+ | | |
15
+ | | required by a bound introduced by this call
16
+ 7 | | yield v;
17
+ 8 | | Ok(())
18
+ 9 | | });
19
+ | |_____________^ expected an `FnOnce<(&str,)>` closure, found `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]`
20
+ |
21
+ = help: the trait `FnOnce<(&str,)>` is not implemented for `[generator@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26]`
16
22
note: required by a bound in `Result::<T, E>::and_then`
17
- --> $RUST/core/src/result.rs
18
- |
19
- | pub fn and_then<U, F: FnOnce(T) -> Result<U, E>>(self, op: F) -> Result<U, E> {
20
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Result::<T, E>::and_then`
23
+ --> $RUST/core/src/result.rs
24
+ |
25
+ | pub fn and_then<U, F: FnOnce(T) -> Result<U, E>>(self, op: F) -> Result<U, E> {
26
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Result::<T, E>::and_then`
0 commit comments