-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify ambiguity in select_nth_unstable docs #119481
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thomcc (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
I'm going to be away for a few months, so I'm rerolling my PRs so that folks don't have to wait for me. Sorry/thanks. r? libs |
@bors r+ rollup |
…le, r=Mark-Simulacrum Clarify ambiguity in select_nth_unstable docs Original docs for `select_nth_unstable` family of functions were ambiguous as to whether "the element at `index`" was the element at `index` before the function reordered the elements or after the function reordered the elements. The most helpful change in this PR is to change the given examples to make this absolutely clear. Before, "the element at `index`" was the same value before and after the reordering, so it didn't help disambiguate the meaning. I've changed the example for `select_nth_unstable` and `select_nth_unstable_by` so that "the element at `index`" is different before and after the reordering, which clears up the ambiguity. The function `select_nth_unstable_by_key` already had an example that was unambiguous. In an attempt to clear up the ambiguity from the get-go, I've added a bit of redundancy to the text. Now the docs refer to "the element at `index` *after the reordering*".
…le, r=Mark-Simulacrum Clarify ambiguity in select_nth_unstable docs Original docs for `select_nth_unstable` family of functions were ambiguous as to whether "the element at `index`" was the element at `index` before the function reordered the elements or after the function reordered the elements. The most helpful change in this PR is to change the given examples to make this absolutely clear. Before, "the element at `index`" was the same value before and after the reordering, so it didn't help disambiguate the meaning. I've changed the example for `select_nth_unstable` and `select_nth_unstable_by` so that "the element at `index`" is different before and after the reordering, which clears up the ambiguity. The function `select_nth_unstable_by_key` already had an example that was unambiguous. In an attempt to clear up the ambiguity from the get-go, I've added a bit of redundancy to the text. Now the docs refer to "the element at `index` *after the reordering*".
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#119481 (Clarify ambiguity in select_nth_unstable docs) - rust-lang#120384 (Use `<T, U>` for array/slice equality `impl`s) - rust-lang#120423 (update indirect structural match lints to match RFC and to show up for dependencies) - rust-lang#120458 (Document `&CStr` to `CString` conversion) - rust-lang#120558 (Stop bailing out from compilation just because there were incoherent traits) - rust-lang#120572 (Update libc to 0.2.153) - rust-lang#120641 (rustdoc: trait.impl, type.impl: sort impls to make it not depend on serialization order) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#119481 (Clarify ambiguity in select_nth_unstable docs) - rust-lang#119600 (Remove outdated references to librustc_middle) - rust-lang#120458 (Document `&CStr` to `CString` conversion) - rust-lang#120569 (coverage: Improve handling of function/closure spans) - rust-lang#120572 (Update libc to 0.2.153) - rust-lang#120587 (miri: normalize struct tail in ABI compat check) - rust-lang#120607 (fix rust-lang#120603 by adding a check in default_read_buf) - rust-lang#120636 (Subtree update of `rust-analyzer`) - rust-lang#120641 (rustdoc: trait.impl, type.impl: sort impls to make it not depend on serialization order) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119481 - romanows:fix-doc-select-nth-unstable, r=Mark-Simulacrum Clarify ambiguity in select_nth_unstable docs Original docs for `select_nth_unstable` family of functions were ambiguous as to whether "the element at `index`" was the element at `index` before the function reordered the elements or after the function reordered the elements. The most helpful change in this PR is to change the given examples to make this absolutely clear. Before, "the element at `index`" was the same value before and after the reordering, so it didn't help disambiguate the meaning. I've changed the example for `select_nth_unstable` and `select_nth_unstable_by` so that "the element at `index`" is different before and after the reordering, which clears up the ambiguity. The function `select_nth_unstable_by_key` already had an example that was unambiguous. In an attempt to clear up the ambiguity from the get-go, I've added a bit of redundancy to the text. Now the docs refer to "the element at `index` *after the reordering*".
Original docs for
select_nth_unstable
family of functions were ambiguous as to whether "the element atindex
" was the element atindex
before the function reordered the elements or after the function reordered the elements.The most helpful change in this PR is to change the given examples to make this absolutely clear. Before, "the element at
index
" was the same value before and after the reordering, so it didn't help disambiguate the meaning. I've changed the example forselect_nth_unstable
andselect_nth_unstable_by
so that "the element atindex
" is different before and after the reordering, which clears up the ambiguity. The functionselect_nth_unstable_by_key
already had an example that was unambiguous.In an attempt to clear up the ambiguity from the get-go, I've added a bit of redundancy to the text. Now the docs refer to "the element at
index
after the reordering".