Thanks for the answer.
I’m kinda surprised this issue isn’t getting more attention, this seems to make lots of things a pain.
Here for example, everytime I want to write a function that take a generic
TraitA<T> as input, I have rewrite the
where clause every time, even if I don’t want to use the fact that
i32: Into<T>. Is there a way around that ? By that I mean is there a way to transform any where clause into a regular trait bound ?
Let’s say I want to create a
Mat trait, I want this trait to be iterable by reference:
pub trait Mat: Index<(usize, usize), Output = < Self as Mat >::Item> where
for<'a> &'a Self: IntoIterator<Item = &'a < Self as Mat >::Item>
type Item: MatItem;
Doing it this way is clearly not a good idea since this fairly big where clause would have to be repeated often. What are my options here ?