Here: IndexMut in std::ops - Rust
and here: Index in std::ops - Rust
Am I missing something?
Notice that it's dependent, IndexMut: Index
, so it reuses the same Output
type. So here:
fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
It really means -> &mut <Self as Index>::Output
.
Thanks a lot, I was definitely missing something !