about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorfee1-dead <ent3rm4n@gmail.com>2022-09-25 22:06:36 +0800
committerGitHub <noreply@github.com>2022-09-25 22:06:36 +0800
commit033f93fbb98c3fb9bd09858f5b822789a4339de8 (patch)
tree6e6154956c6abe0fdd62096712f757ca5a6f707f /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent6f6010b08bd5e5dd0d03d4abf35a3acc4d2433a2 (diff)
parent97bd49bf2d1d7604dc0a5040edb2a550adf5497b (diff)
downloadrust-033f93fbb98c3fb9bd09858f5b822789a4339de8.tar.gz
rust-033f93fbb98c3fb9bd09858f5b822789a4339de8.zip
Rollup merge of #98111 - eggyal:issue-97982, r=GuillaumeGomez
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
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions