If I have a generic struct:
pub struct AStruct<T>
where
T: MyTrait
{
field: T
}
And I implement some OtherTrait on it, why does the impl also require a where T: MyTrait
?
Ex. this won't work:
impl OtherTrait for AStruct<T> {}
Has to be:
impl OtherTrait for AStruct<T>
where T: MyTrait
{}
If the struct can only be made with a type that implements MyTrait, why do I need to put a bunch of extra where clauses on all the impl?