mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 10:47:16 +00:00

This adds an `iter!` macro that can be used to create movable generators. This also adds a yield_expr feature so the `yield` keyword can be used within iter! macro bodies. This was needed because several unstable features each need `yield` expressions, so this allows us to stabilize them separately from any individual feature. Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de> Co-authored-by: Jieyou Xu <jieyouxu@outlook.com> Co-authored-by: Travis Cross <tc@traviscross.com>
73 lines
3.3 KiB
Plaintext
73 lines
3.3 KiB
Plaintext
error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
|
|
--> $DIR/iter-macro-not-async-closure.rs:32:34
|
|
|
|
|
LL | ...n!(call_async_once(f));
|
|
| --------------- ^ unsatisfied trait bound
|
|
| |
|
|
| required by a bound introduced by this call
|
|
|
|
|
= help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
|
|
note: required by a bound in `call_async_once`
|
|
--> $DIR/iter-macro-not-async-closure.rs:21:34
|
|
|
|
|
LL | ...pl AsyncFnOnce()) {
|
|
| ^^^^^^^^^^^^^ required by this bound in `call_async_once`
|
|
|
|
error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
|
|
--> $DIR/iter-macro-not-async-closure.rs:32:18
|
|
|
|
|
LL | ...n!(call_async_once(f));
|
|
| ^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
|
|
|
|
= help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
|
|
note: required by a bound in `call_async_once`
|
|
--> $DIR/iter-macro-not-async-closure.rs:21:34
|
|
|
|
|
LL | ...pl AsyncFnOnce()) {
|
|
| ^^^^^^^^^^^^^ required by this bound in `call_async_once`
|
|
|
|
error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
|
|
--> $DIR/iter-macro-not-async-closure.rs:32:13
|
|
|
|
|
LL | ... = pin!(call_async_once(f));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
|
|
|
|
= help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
|
|
note: required by a bound in `call_async_once`
|
|
--> $DIR/iter-macro-not-async-closure.rs:21:34
|
|
|
|
|
LL | ...pl AsyncFnOnce()) {
|
|
| ^^^^^^^^^^^^^ required by this bound in `call_async_once`
|
|
= note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
|
|
--> $DIR/iter-macro-not-async-closure.rs:32:13
|
|
|
|
|
LL | ... = pin!(call_async_once(f));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
|
|
|
|
= help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
|
|
note: required by a bound in `call_async_once`
|
|
--> $DIR/iter-macro-not-async-closure.rs:21:34
|
|
|
|
|
LL | ...pl AsyncFnOnce()) {
|
|
| ^^^^^^^^^^^^^ required by this bound in `call_async_once`
|
|
= note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
|
|
--> $DIR/iter-macro-not-async-closure.rs:37:5
|
|
|
|
|
LL | ...::noop()));
|
|
| ...^^^^^^^^^^ unsatisfied trait bound
|
|
|
|
|
= help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
|
|
note: required by a bound in `call_async_once`
|
|
--> $DIR/iter-macro-not-async-closure.rs:21:34
|
|
|
|
|
LL | ...pl AsyncFnOnce()) {
|
|
| ^^^^^^^^^^^^^ required by this bound in `call_async_once`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|