diff options
| author | Mario Carneiro <di.gama@gmail.com> | 2022-01-04 21:32:20 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-04 21:32:20 -0800 |
| commit | 06b17a21813c2869ee50cbc4c8a92a04e40d2959 (patch) | |
| tree | 61baf13db28412f0fa24c2bfb306335d30f23c2c | |
| parent | b9f008b1eeed6055eb36e0fae11b30e8ffc2ebfa (diff) | |
| download | rust-06b17a21813c2869ee50cbc4c8a92a04e40d2959.tar.gz rust-06b17a21813c2869ee50cbc4c8a92a04e40d2959.zip | |
Clarify that ordering is unspecified
| -rw-r--r-- | library/alloc/src/slice.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index 020dfcbaac6..d03ae2d5c15 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -373,6 +373,8 @@ impl<T> [T] { /// /// During sorting, the key function is called at most once per element, by using /// temporary storage to remember the results of key evaluation. + /// The order of calls to the key function is unspecified and may change in future versions + /// of the standard library. /// /// This sort is stable (i.e., does not reorder equal elements) and *O*(*m* \* *n* + *n* \* log(*n*)) /// worst-case, where the key function is *O*(*m*). |
