2024-01-25 17:43:35 +00:00
|
|
|
error[E0277]: the trait bound `i16: ops::async_function::internal_implementation_detail::AsyncFnKindHelper<i8>` is not satisfied
|
2024-02-06 17:41:48 +00:00
|
|
|
--> $DIR/wrong-fn-kind.rs:11:20
|
2024-01-25 17:43:35 +00:00
|
|
|
|
|
|
|
|
|
LL | needs_async_fn(async || {
|
|
|
|
|
| _____--------------_^
|
|
|
|
|
| | |
|
|
|
|
|
| | required by a bound introduced by this call
|
|
|
|
|
LL | |
|
2024-02-06 17:41:48 +00:00
|
|
|
LL | | // FIXME: Should say "closure is `async FnMut` but it needs `async Fn`" or sth.
|
2024-01-25 17:43:35 +00:00
|
|
|
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`
|
2024-02-06 17:41:48 +00:00
|
|
|
--> $DIR/wrong-fn-kind.rs:8:31
|
2024-01-25 17:43:35 +00:00
|
|
|
|
|
2024-02-06 17:41:48 +00:00
|
|
|
LL | fn needs_async_fn(_: impl async Fn()) {}
|
|
|
|
|
| ^^^^^^^^^^ required by this bound in `needs_async_fn`
|
2024-01-25 17:43:35 +00:00
|
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|