Skip to content

Commit

Permalink
Fix CI failures (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e authored Sep 16, 2024
1 parent e8abfaa commit 0588ec1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion async-stream-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn visit_token_stream_impl(
tokens = rest.into_iter().peekable();
}
Err(e) => {
out.append_all(&mut e.to_compile_error().into_iter());
out.append_all(e.to_compile_error().into_iter());
*modified = true;
return;
}
Expand Down
13 changes: 12 additions & 1 deletion async-stream/tests/ui/yield_in_closure.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ error[E0658]: yield syntax is experimental
|
= 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_closure.rs:7:17
|
7 | yield v;
| ^^^^^^^
|
help: use `#[coroutine]` to make this closure a coroutine
|
6 | .and_then(#[coroutine] |v| {
| ++++++++++++

error[E0277]: expected a `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
--> tests/ui/yield_in_closure.rs:6:23
|
Expand All @@ -18,7 +29,7 @@ error[E0277]: expected a `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui
9 | | });
| |_____________^ expected an `FnOnce(&str)` closure, found `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
|
= help: the trait `FnOnce<(&str,)>` is not implemented for `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
= help: the trait `FnOnce(&str)` is not implemented for `{coroutine@$DIR/tests/ui/yield_in_closure.rs:6:23: 6:26}`
note: required by a bound in `Result::<T, E>::and_then`
--> $RUST/core/src/result.rs
|
Expand Down
11 changes: 11 additions & 0 deletions async-stream/tests/ui/yield_in_nested_fn.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ error[E0658]: yield syntax is experimental
|
= 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
|
Expand Down

0 comments on commit 0588ec1

Please sign in to comment.