mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
033f93fbb9
Clarify `[T]::select_nth_unstable*` return values In cases where the nth element is not unique within the slice, it is not correct to say that the values in the returned triplet include ones for "all elements" less/greater than that at the given index: indeed one (or more) such values would then also contain elements equal to that at the given index. The text proposed here clarifies exactly what is returned, but in so doing it is also documenting an implementation detail that previously wasn't detailed: namely that the returned slices are slices into the reordered slice. I don't think this can be contentious, because the lifetimes of those returned slices are bound to that of the original (now reordered) slice—so there really isn't any other reasonable implementation that could have this behaviour; but nevertheless it's probably best if `@rust-lang/libs-api` give it a nod? Fixes #97982 r? `@m-ou-se` `@rustbot` label +A-docs +C-bug +T-libs-api -T-libs |
||
---|---|---|
.. | ||
alloc | ||
backtrace@07872f28cd | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@699c093a42 | ||
test | ||
unwind |