Skip to content

Commit 0588ec1

Browse files
authored
Fix CI failures (#111)
1 parent e8abfaa commit 0588ec1

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

async-stream-impl/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fn visit_token_stream_impl(
6565
tokens = rest.into_iter().peekable();
6666
}
6767
Err(e) => {
68-
out.append_all(&mut e.to_compile_error().into_iter());
68+
out.append_all(e.to_compile_error().into_iter());
6969
*modified = true;
7070
return;
7171
}

async-stream/tests/ui/yield_in_closure.stderr

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ error[E0658]: yield syntax is experimental
66
|
77
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
88

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+
920
error[E0277]: expected a `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
1021
--> tests/ui/yield_in_closure.rs:6:23
1122
|
@@ -18,7 +29,7 @@ error[E0277]: expected a `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui
1829
9 | | });
1930
| |_____________^ expected an `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
2031
|
21-
= help: the trait `FnOnce<(&str,)>` is not implemented for `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
32+
= help: the trait `FnOnce(&str)` is not implemented for `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
2233
note: required by a bound in `Result::<T, E>::and_then`
2334
--> $RUST/core/src/result.rs
2435
|

async-stream/tests/ui/yield_in_nested_fn.stderr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ error[E0658]: yield syntax is experimental
66
|
77
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
88

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+
920
error[E0627]: yield expression outside of coroutine literal
1021
--> tests/ui/yield_in_nested_fn.rs:6:13
1122
|

0 commit comments

Comments
 (0)