Rant after trying Rust a bit

Enamex via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 27 13:58:47 PDT 2015


On Monday, 27 July 2015 at 19:21:10 UTC, Tobias Müller wrote:
> trait A {...}
> trait B {...}
>
> trait C : A,B { }
>
> impl<T: A+B> C for T { }
>
> fn myFunction(c: C) {...}
>
> Tobi

Has to be:
     fn my_function(c: &C) { ... }
actually, because trait objects can only be passed by 
reference/borrowed-pointer.


More information about the Digitalmars-d mailing list