External Publication
Visit Post

`<[T]>::sort_by_index` and `<[T]>::sort_by_key_and_index`

Rust Internals [Unofficial] April 17, 2026
Source

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

Loading comments...