Description
The IndexSlice
internal type has two methods
- https://doc.rust-lang.org/nightly/nightly-rustc/rustc_index/struct.IndexSlice.html#method.pick2_mut
- https://doc.rust-lang.org/nightly/nightly-rustc/rustc_index/struct.IndexSlice.html#method.pick3_mut
that offer a safe interface to getting multiple mutable borrows into the slice.
Now that https://doc.rust-lang.org/beta/std/primitive.slice.html#method.get_disjoint_mut exists, their current non-trivial implementations can be replaced with a call to that stabilized method (and some pattern-matching and unwrapping).
It's probably not worth changing all the code to stop using pick[23]_mut
; just swapping out the implementation is enough.