From 317f15304e6091a1f3cc58c52d36df037ef50db0 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Sat, 2 Feb 2019 01:32:56 -0800 Subject: Revert "Remove mentions of unstable sort_by_cached key from stable documentation" This reverts commit 9c7b69e17909ceb090a1c4b8882a4e0924a2a755. --- src/libcore/slice/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libcore') diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index acca9748372..a628fd0cfa4 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -1563,6 +1563,10 @@ impl [T] { /// randomization to avoid degenerate cases, but with a fixed seed to always provide /// deterministic behavior. /// + /// Due to its key calling strategy, [`sort_unstable_by_key`](#method.sort_unstable_by_key) + /// is likely to be slower than [`sort_by_cached_key`](#method.sort_by_cached_key) in + /// cases where the key function is expensive. + /// /// # Examples /// /// ``` -- cgit 1.4.1-3-g733a5