fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: `fn() -> impl Future<Output = ()> {foo}` is not a future 2 --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:10:9 3 | 4LL | bar(foo); 5 | --- ^^^ `fn() -> impl Future<Output = ()> {foo}` is not a future 6 | | 7 | required by a bound introduced by this call 8 | 9 = help: the trait `Future` is not implemented for fn item `fn() -> impl Future<Output = ()> {foo}` 10 = note: fn() -> impl Future<Output = ()> {foo} must be a future or must implement `IntoFuture` to be awaited 11note: required by a bound in `bar` 12 --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:7:16 13 | 14LL | fn bar(f: impl Future<Output=()>) {} 15 | ^^^^^^^^^^^^^^^^^ required by this bound in `bar` 16help: use parentheses to call this function 17 | 18LL | bar(foo()); 19 | ++ 20 21error[E0277]: `{closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33}` is not a future 22 --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:12:9 23 | 24LL | bar(async_closure); 25 | --- ^^^^^^^^^^^^^ `{closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33}` is not a future 26 | | 27 | required by a bound introduced by this call 28 | 29 = help: the trait `Future` is not implemented for closure `{closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33}` 30 = note: {closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33} must be a future or must implement `IntoFuture` to be awaited 31note: required by a bound in `bar` 32 --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:7:16 33 | 34LL | fn bar(f: impl Future<Output=()>) {} 35 | ^^^^^^^^^^^^^^^^^ required by this bound in `bar` 36help: use parentheses to call this closure 37 | 38LL | bar(async_closure()); 39 | ++ 40 41error: aborting due to 2 previous errors 42 43For more information about this error, try `rustc --explain E0277`.