3 ms·
It's a limitation of the borrow checker, but it's more of a limitation of simple, orthogonal design than a hard technical limitation of the implementation. It
by GolDDranks 10y ago
It's a limitation of the borrow checker, but it's more of a limitation of simple, orthogonal design than a hard technical limitation of the implementation.
It could have special cases for many things, such as letting the disjoint indexes pass. But that would be a special case because it can't always prove that the indexes are disjoint. So it leaves up to libraries to provide APIs that do that. This is why `split_at_mut()` demonstrated in grandparent post exists.