rust/tests/ui/async-await/async-closures/wrong-fn-kind.stderr
2024-02-06 02:22:58 +00:00

23 lines
901 B
Plaintext

error[E0277]: the trait bound `i16: ops::async_function::internal_implementation_detail::AsyncFnKindHelper<i8>` is not satisfied
--> $DIR/wrong-fn-kind.rs:13:20
|
LL | needs_async_fn(async || {
| _____--------------_^
| | |
| | required by a bound introduced by this call
LL | |
LL | | // FIXME: Should say "closure is AsyncFnMut but it needs AsyncFn" or sth.
LL | | x += 1;
LL | | });
| |_____^ the trait `ops::async_function::internal_implementation_detail::AsyncFnKindHelper<i8>` is not implemented for `i16`
|
note: required by a bound in `needs_async_fn`
--> $DIR/wrong-fn-kind.rs:10:31
|
LL | fn needs_async_fn(_: impl AsyncFn()) {}
| ^^^^^^^^^ required by this bound in `needs_async_fn`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.