rust/tests/ui/iterators/iter-macro-not-async-closure-simplified.wide.stderr
Oli Scherer 5fbdfc3e10
Add iter macro
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>
2025-06-03 10:52:32 -07:00

18 lines
817 B
Plaintext

error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure-simplified.rs:21:21: 21:28}: AsyncFnOnce()` is not satisfied
--> $DIR/iter-macro-not-async-closure-simplified.rs:27:21
|
LL | call_async_once(f);
| --------------- ^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure-simplified.rs:21:21: 21:28}`
| |
| required by a bound introduced by this call
|
note: required by a bound in `call_async_once`
--> $DIR/iter-macro-not-async-closure-simplified.rs:18:28
|
LL | fn call_async_once(_: impl AsyncFnOnce()) {}
| ^^^^^^^^^^^^^ required by this bound in `call_async_once`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.