]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr
Rollup merge of #65276 - varkor:toolstate-no-ping, r=Mark-Simulacrum
[rust.git] / src / test / ui / suggestions / async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr
1 error[E0277]: the trait bound `fn() -> impl std::future::Future {foo}: std::future::Future` is not satisfied
2   --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:9:9
3    |
4 LL | fn bar(f: impl Future<Output=()>) {}
5    |    ---         ----------------- required by this bound in `bar`
6 ...
7 LL |     bar(foo);
8    |         ^^^
9    |         |
10    |         the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}`
11    |         help: use parentheses to call the function: `foo()`
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0277`.