@@ -2898,7 +2898,9 @@ impl<T> [T] {
2898
2898
/// It is typically faster than stable sorting, except in a few special cases, e.g., when the
2899
2899
/// slice is partially sorted.
2900
2900
///
2901
- /// If `T: Ord` does not implement a total order, the implementation may panic.
2901
+ /// # Panics
2902
+ ///
2903
+ /// May panic if `T: Ord` does not implement a total order.
2902
2904
///
2903
2905
/// # Examples
2904
2906
///
@@ -2955,7 +2957,9 @@ impl<T> [T] {
2955
2957
/// It is typically faster than stable sorting, except in a few special cases, e.g., when the
2956
2958
/// slice is partially sorted.
2957
2959
///
2958
- /// If `T: Ord` does not implement a total order, the implementation may panic.
2960
+ /// # Panics
2961
+ ///
2962
+ /// May panic if `compare` does not implement a total order.
2959
2963
///
2960
2964
/// # Examples
2961
2965
///
@@ -2999,7 +3003,9 @@ impl<T> [T] {
2999
3003
/// It is typically faster than stable sorting, except in a few special cases, e.g., when the
3000
3004
/// slice is partially sorted.
3001
3005
///
3002
- /// If `K: Ord` does not implement a total order, the implementation may panic.
3006
+ /// # Panics
3007
+ ///
3008
+ /// May panic if `K: Ord` does not implement a total order.
3003
3009
///
3004
3010
/// # Examples
3005
3011
///
@@ -3042,15 +3048,14 @@ impl<T> [T] {
3042
3048
/// Median of Medians using Tukey's Ninther for pivot selection, which guarantees linear runtime
3043
3049
/// for all inputs.
3044
3050
///
3045
- /// It is typically faster than stable sorting, except in a few special cases, e.g., when the
3046
- /// slice is nearly fully sorted, where `slice::sort` may be faster.
3047
- ///
3048
3051
/// [`sort_unstable`]: slice::sort_unstable
3049
3052
///
3050
3053
/// # Panics
3051
3054
///
3052
3055
/// Panics when `index >= len()`, meaning it always panics on empty slices.
3053
3056
///
3057
+ /// May panic if `T: Ord` does not implement a total order.
3058
+ ///
3054
3059
/// # Examples
3055
3060
///
3056
3061
/// ```
@@ -3103,15 +3108,14 @@ impl<T> [T] {
3103
3108
/// Median of Medians using Tukey's Ninther for pivot selection, which guarantees linear runtime
3104
3109
/// for all inputs.
3105
3110
///
3106
- /// It is typically faster than stable sorting, except in a few special cases, e.g., when the
3107
- /// slice is nearly fully sorted, where `slice::sort` may be faster.
3108
- ///
3109
3111
/// [`sort_unstable`]: slice::sort_unstable
3110
3112
///
3111
3113
/// # Panics
3112
3114
///
3113
3115
/// Panics when `index >= len()`, meaning it always panics on empty slices.
3114
3116
///
3117
+ /// May panic if `compare` does not implement a total order.
3118
+ ///
3115
3119
/// # Examples
3116
3120
///
3117
3121
/// ```
@@ -3168,15 +3172,14 @@ impl<T> [T] {
3168
3172
/// Median of Medians using Tukey's Ninther for pivot selection, which guarantees linear runtime
3169
3173
/// for all inputs.
3170
3174
///
3171
- /// It is typically faster than stable sorting, except in a few special cases, e.g., when the
3172
- /// slice is nearly fully sorted, where `slice::sort` may be faster.
3173
- ///
3174
3175
/// [`sort_unstable`]: slice::sort_unstable
3175
3176
///
3176
3177
/// # Panics
3177
3178
///
3178
3179
/// Panics when `index >= len()`, meaning it always panics on empty slices.
3179
3180
///
3181
+ /// May panic if `K: Ord` does not implement a total order.
3182
+ ///
3180
3183
/// # Examples
3181
3184
///
3182
3185
/// ```
0 commit comments