about summary refs log tree commit diff
path: root/RELEASES.md
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2024-08-30 17:54:36 -0700
committerJosh Stone <jistone@redhat.com>2024-08-30 17:54:36 -0700
commit27873f8052625069c20263862eb7aa92293c3eea (patch)
tree0f2f86687b74fea5f7d7a7c0e71872e093411673 /RELEASES.md
parentdd9fcffb20982b053d8b628663d7ceb690878eed (diff)
downloadrust-27873f8052625069c20263862eb7aa92293c3eea.tar.gz
rust-27873f8052625069c20263862eb7aa92293c3eea.zip
Mention sort perf, and add its panics in compat notes
Diffstat (limited to 'RELEASES.md')
-rw-r--r--RELEASES.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/RELEASES.md b/RELEASES.md
index fb1af44e52c..c98af314ccd 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -47,7 +47,7 @@ Libraries
 
 - [Split core's `PanicInfo` and std's `PanicInfo`.](https://github.com/rust-lang/rust/pull/115974/) (see compatibility note below)
 - [Generalize `{Rc,Arc}::make_mut()` to unsized types.](https://github.com/rust-lang/rust/pull/116113/)
-- [Replace sort implementations with stable `driftsort` and unstable `ipnsort`.](https://github.com/rust-lang/rust/pull/124032/) See the [research project](https://github.com/Voultapher/sort-research-rs) for more details.
+- [Replace sort implementations with stable `driftsort` and unstable `ipnsort`.](https://github.com/rust-lang/rust/pull/124032/) All `slice::sort*` and `slice::select_nth*` methods are expected to see significant performance improvements. See the [research project](https://github.com/Voultapher/sort-research-rs) for more details.
 - [Document behavior of `create_dir_all` with respect to empty paths.](https://github.com/rust-lang/rust/pull/125112/)
 - [Fix interleaved output in the default panic hook when multiple threads panic simultaneously.](https://github.com/rust-lang/rust/pull/127397/)
 
@@ -106,6 +106,8 @@ Compatibility Notes
  
   The reason is that these types have different roles: `std::panic::PanicHookInfo` is the argument to the [panic hook](https://doc.rust-lang.org/stable/std/panic/fn.set_hook.html) in std context (where panics can have an arbitrary payload), while `core::panic::PanicInfo` is the argument to the [`#[panic_handler]`](https://doc.rust-lang.org/nomicon/panic-handler.html) in no_std context (where panics always carry a formatted *message*). Separating these types allows us to add more useful methods to these types, such as `std::panic::PanicHookInfo::payload_as_str()` and `core::panic::PanicInfo::message()`.
 
+* The new sort implementations may panic if a type's implementation of [`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html) (or the given comparison function) does not implement a [total order](https://en.wikipedia.org/wiki/Total_order) as the trait requires. `Ord`'s supertraits (`PartialOrd`, `Eq`, and `PartialEq`) must also be consistent. The previous implementations would not "notice" any problem, but the new implementations have a good chance of detecting inconsistencies, throwing a panic rather than returning knowingly unsorted data.
+
 <a id="1.81.0-Internal-Changes"></a>
 
 Internal Changes