Skip to content

Commit

Permalink
Update ui test output for Rust 1.81
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 15, 2024
1 parent d5a69cb commit c825c4d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
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 c825c4d

Please sign in to comment.