@@ -2898,7 +2898,9 @@ impl<T> [T] {
28982898 /// It is typically faster than stable sorting, except in a few special cases, e.g., when the
28992899 /// slice is partially sorted.
29002900 ///
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.
29022904 ///
29032905 /// # Examples
29042906 ///
@@ -2955,7 +2957,9 @@ impl<T> [T] {
29552957 /// It is typically faster than stable sorting, except in a few special cases, e.g., when the
29562958 /// slice is partially sorted.
29572959 ///
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.
29592963 ///
29602964 /// # Examples
29612965 ///
@@ -2999,7 +3003,9 @@ impl<T> [T] {
29993003 /// It is typically faster than stable sorting, except in a few special cases, e.g., when the
30003004 /// slice is partially sorted.
30013005 ///
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.
30033009 ///
30043010 /// # Examples
30053011 ///
@@ -3042,15 +3048,14 @@ impl<T> [T] {
30423048 /// Median of Medians using Tukey's Ninther for pivot selection, which guarantees linear runtime
30433049 /// for all inputs.
30443050 ///
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- ///
30483051 /// [`sort_unstable`]: slice::sort_unstable
30493052 ///
30503053 /// # Panics
30513054 ///
30523055 /// Panics when `index >= len()`, meaning it always panics on empty slices.
30533056 ///
3057+ /// May panic if `T: Ord` does not implement a total order.
3058+ ///
30543059 /// # Examples
30553060 ///
30563061 /// ```
@@ -3103,15 +3108,14 @@ impl<T> [T] {
31033108 /// Median of Medians using Tukey's Ninther for pivot selection, which guarantees linear runtime
31043109 /// for all inputs.
31053110 ///
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- ///
31093111 /// [`sort_unstable`]: slice::sort_unstable
31103112 ///
31113113 /// # Panics
31123114 ///
31133115 /// Panics when `index >= len()`, meaning it always panics on empty slices.
31143116 ///
3117+ /// May panic if `compare` does not implement a total order.
3118+ ///
31153119 /// # Examples
31163120 ///
31173121 /// ```
@@ -3168,15 +3172,14 @@ impl<T> [T] {
31683172 /// Median of Medians using Tukey's Ninther for pivot selection, which guarantees linear runtime
31693173 /// for all inputs.
31703174 ///
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- ///
31743175 /// [`sort_unstable`]: slice::sort_unstable
31753176 ///
31763177 /// # Panics
31773178 ///
31783179 /// Panics when `index >= len()`, meaning it always panics on empty slices.
31793180 ///
3181+ /// May panic if `K: Ord` does not implement a total order.
3182+ ///
31803183 /// # Examples
31813184 ///
31823185 /// ```
0 commit comments