blob: 3141b1b65f9ba7317dba563b78b540f252da7426 [file] [log] [blame]
error[E0277]: the trait bound `fn() -> impl std::future::Future {foo}: std::future::Future` is not satisfied
--> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:9:5
|
LL | fn bar(f: impl Future<Output=()>) {}
| --------------------------------- required by `bar`
...
LL | bar(foo);
| ^^^ the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}`
|
= help: use parentheses to call the function: `foo()`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.