3 ms·
The author is referring to the case where you have multiple traits, and want to provide implentations like: impl<T: Cat> Animal for T { ... } impl<T: D
by Diggsey 5y ago
The author is referring to the case where you have multiple traits, and want to provide implentations like:
impl<T: Cat> Animal for T { ... }
impl<T: Dog> Animal for T { ... }
This is impossible without specialization, since there's no way to express the constraint that no type implements both `Dog` and `Cat`.
Having multiple blanket trait implementations like this can be used to emulated inheritance, whereas a single blanket implementation cannot.