These are chat archives for rust-lang/rust

16th
Jul 2018
Brandon Ros
@brandonros
Jul 16 2018 01:53
matrixbot
@matrixbot
Jul 16 2018 02:04
bspeice I think the async! macro is still needed for the time being - while the RFC has been merged, the rust-lang/rust#50547 hasn't.
Zakarum
@omni-viral
Jul 16 2018 08:52
@brandonros I guess that await! can be used only in async functions
Karthik Ravikanti
@plumenator
Jul 16 2018 14:24
What does it mean to implement a trait for another trait? Why is this possible and why isn’t it documented anywhere?
CrLF0710
@crlf0710
Jul 16 2018 14:25
you can't. You can however implement a trait for a trait object type.
the dyn Trait type can be written as Trait in rust 2015.
Dmitriy
@dpogretskiy
Jul 16 2018 14:27
impl<T> T1 for T where T: T2 {}?
doesn't this work?
Karthik Ravikanti
@plumenator
Jul 16 2018 14:29
so impl T2 for T1 is the same as impl T2 for dyn T1? (where T1 is a trait)
CrLF0710
@crlf0710
Jul 16 2018 14:29
yeah. that's it.
Karthik Ravikanti
@plumenator
Jul 16 2018 14:29
(mindblown)
Thanks!
I wonder if impl T1 for impl T2 is a thing
Dmitriy
@dpogretskiy
Jul 16 2018 14:31
it's same thing as i suggested, doubt it's possible like that
Karthik Ravikanti
@plumenator
Jul 16 2018 14:31
True
Thanks guys, that helped a lot.