Hacker News new | past | comments | ask | show | jobs | submit login

Well, the first two are really just the same thing :P



Eh, with the new oprhan/impl rules associated and uh... not... associated(...?) types have developed quite a schism.


Well, the first two confusingly change two variables at once: the things that are the same (which I presume is what kimundi meant) are

    fn foo<S, T: MyTrait<S>>(elem: T) { ... }

    fn foo<S, T>(elem: T) where T: MyTrait<S> { ... }
and

    fn foo<S, T: MyTrait<Thing = S>>(elem: T) { ... }

    fn foo<S, T>(elem: T) where T: MyTrait<Thing = S> { ... }




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: