`<[T]>::sort_by_index` and `<[T]>::sort_by_key_and_index`
Rust Internals [Unofficial]
April 17, 2026
Maybe if we can somehow type erase other slices and pass their reborrows as an array into sort, it may run assume_unchecked before calling the closure and pass the reborrow to the closure too?
Type erasure is to be able to place them into one array, while still allowing swaps.
Discussion in the ATmosphere