`<[T]>::sort_by_index` and `<[T]>::sort_by_key_and_index`
Rust Internals [Unofficial]
April 14, 2026
Any implementation of this needs to allocate a temporary vector of indices and sort that. There is no reasonable way of doing this in place.
Discussion in the ATmosphere