News for hackers. Stuff that matters.
Re:Zero-cost futures in Rust by dan00 on Saturday August 13, 2016 @07:44AM (#12281113)
Thanks! I just thought their might be some quite important technical reasons for this decision.

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.

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()`