Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI failures #111

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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