You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With 0.1.x and 0.2.x it was possible to return Box<Future<Item = ..., Error = ...>>, but with the 0.3 branch it's no longer possible.
traitT{fnf() -> Box<Future<Output = ()>>;}
This code gives the following compile error:
error[E0038]: the trait `std::future::Future` cannot be made into an object
--> src/main.rs:4:5
|
4 | fn f() -> Box<Future<Output = ()>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::future::Future` cannot be made into an object
|
= note: method `poll` has a non-standard `self` type
Returning with impl Trait is not allowed in trait functions, so that method does not work on any branch.