rust/library
Michael Goulet 68b390ae2a
Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc
Unify stable and unstable sort implementations in same core module

This moves the stable sort implementation to the core::slice::sort module. By virtue of being in core it can't access `Vec`. The two `Vec` used by merge sort, `buf` and `runs`, are modelled as custom types that implement the very limited required `Vec` interface with the help of provided allocation and free functions. This is done to allow future re-use of functions and logic between stable and unstable sort. Such as `insert_head`.

This is in preparation of #100856 and #104116. It only moves code, it *doesn't* change any of the sort related logic. This unlocks the ability to share `insert_head`, `insert_tail`, `swap_if_less` `merge` and more.

Tagging ````@Mark-Simulacrum```` I hope this allows progress on #100856, by moving `merge_sort` here I hope future changes will be easier to review.
2023-01-20 21:33:21 -05:00
..
alloc Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc 2023-01-20 21:33:21 -05:00
backtrace@07872f28cd Update backtrace 2022-09-02 16:09:58 -04:00
core Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc 2023-01-20 21:33:21 -05:00
panic_abort Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
panic_unwind Replace libstd, libcore, liballoc in docs. 2022-12-30 14:00:40 +01:00
portable-simd Fix rustdoc lints 2022-11-06 17:21:22 -05:00
proc_macro Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
profiler_builtins Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core
rustc-std-workspace-std
std signal update string representation for haiku. 2023-01-18 23:06:59 +00:00
stdarch@790411f93c library: update stdarch submodule 2022-10-13 09:41:16 +08:00
test Remove various double spaces in source comments. 2023-01-14 17:22:04 +01:00
unwind Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00