rust/library/core/src/slice
Yuki Okushi d6f27401f1
Rollup merge of #106985 - jofas:106746-fix, r=ChrisDenton
Enhanced doucmentation of binary search methods for `slice` and `VecDeque` for unsorted instances

Fixes #106746. Issue #106746 raises the concern that the binary search methods for slices and deques aren't explicit enough about the fact that they are only applicable to sorted slices/deques. I changed the explanation for these methods. I took the relatively harsh description of the behaviour of binary search on unsorted collections ("unspecified and meaningless") from the description of the [`partition_point`](https://doc.rust-lang.org/std/primitive.slice.html#method.partition_point) method:

> If this slice is not partitioned, the returned result is unspecified and meaningless, as this method performs a kind of binary search.
2023-03-30 21:06:59 +09:00
..
iter replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
ascii.rs EscapeAscii is not an ExactSizeIterator 2022-07-29 00:35:38 +00:00
cmp.rs Merge two different equality specialization traits in core 2023-03-01 14:42:06 -08:00
index.rs Use nuw when calculating slice lengths from Ranges 2023-03-05 15:15:22 -08:00
iter.rs Switch impls of is_sorted_by between slices and slice iters 2023-03-17 18:10:21 +00:00
memchr.rs Change 'from_bytes_until_nul' to const stable 2023-02-01 02:14:07 -05:00
mod.rs Rollup merge of #106985 - jofas:106746-fix, r=ChrisDenton 2023-03-30 21:06:59 +09:00
raw.rs Print the precondition we violated, and visible through output capture 2022-10-26 22:09:17 -04:00
rotate.rs Make ZST checks in core/alloc more readable 2022-09-22 23:12:29 -07:00
sort.rs Match unmatched backticks in library/ 2023-03-03 03:03:29 +01:00
specialize.rs Remove size_of == 1 case from fill specialization. 2021-08-09 19:25:28 +02:00