You can't do `foo() -> Trait`. It would have to be `foo() -> ~Trait`.
Well, unless DST fixes this. I assume this is the same reason we
return specific instances of iterators instead of an Iteratable trait
object.

jack.

On Tue, Jan 14, 2014 at 10:10 PM, Eric Reed <[email protected]> wrote:
> How would that make us lose stack allocated return values?
>
>
> On Tue, Jan 14, 2014 at 5:22 PM, Jack Moffitt <[email protected]> wrote:
>>
>> > Good point. Make `Chan` a trait with implementers `UniqueChan` and
>> > `SharedChan`?
>>
>> I suppose the main downside of that solution is that you lose stack
>> allocated return values.
>>
>> jack.
>
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to