Re:Zero-cost futures in Rust
by Manishearth on Saturday August 13, 2016 @09:33AM
(#12281420)
Exactly -- it only stops you from creating function-likes that have multiple return types (not closures, because closures aren't locally generic anyway). If you really need such behavior, regular generic functions or traits will work, e.g. `.collect()`
After all overloading the return type is quite usual and extremly helpful for parsing or the conversion of types.
But these kind of operations most likely will be done with a Trait in Rust, so having this option for closures might not be that important.