Skip to content

Commit b0cdf7e

Browse files
authored
Rollup merge of #93480 - est31:remove_unstable_deprecated, r=Mark-Simulacrum
Remove deprecated and unstable slice_partition_at_index functions They have been deprecated since commit 01ac5a9 which was part of the 1.49.0 release, so from the point of nightly, 11 releases ago.
2 parents cd27f1b + 105a746 commit b0cdf7e

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

library/core/src/slice/mod.rs

-44
Original file line numberDiff line numberDiff line change
@@ -2558,50 +2558,6 @@ impl<T> [T] {
25582558
sort::quicksort(self, |a, b| f(a).lt(&f(b)));
25592559
}
25602560

2561-
/// Reorder the slice such that the element at `index` is at its final sorted position.
2562-
#[unstable(feature = "slice_partition_at_index", issue = "55300")]
2563-
#[rustc_deprecated(since = "1.49.0", reason = "use the select_nth_unstable() instead")]
2564-
#[inline]
2565-
pub fn partition_at_index(&mut self, index: usize) -> (&mut [T], &mut T, &mut [T])
2566-
where
2567-
T: Ord,
2568-
{
2569-
self.select_nth_unstable(index)
2570-
}
2571-
2572-
/// Reorder the slice with a comparator function such that the element at `index` is at its
2573-
/// final sorted position.
2574-
#[unstable(feature = "slice_partition_at_index", issue = "55300")]
2575-
#[rustc_deprecated(since = "1.49.0", reason = "use select_nth_unstable_by() instead")]
2576-
#[inline]
2577-
pub fn partition_at_index_by<F>(
2578-
&mut self,
2579-
index: usize,
2580-
compare: F,
2581-
) -> (&mut [T], &mut T, &mut [T])
2582-
where
2583-
F: FnMut(&T, &T) -> Ordering,
2584-
{
2585-
self.select_nth_unstable_by(index, compare)
2586-
}
2587-
2588-
/// Reorder the slice with a key extraction function such that the element at `index` is at its
2589-
/// final sorted position.
2590-
#[unstable(feature = "slice_partition_at_index", issue = "55300")]
2591-
#[rustc_deprecated(since = "1.49.0", reason = "use the select_nth_unstable_by_key() instead")]
2592-
#[inline]
2593-
pub fn partition_at_index_by_key<K, F>(
2594-
&mut self,
2595-
index: usize,
2596-
f: F,
2597-
) -> (&mut [T], &mut T, &mut [T])
2598-
where
2599-
F: FnMut(&T) -> K,
2600-
K: Ord,
2601-
{
2602-
self.select_nth_unstable_by_key(index, f)
2603-
}
2604-
26052561
/// Reorder the slice such that the element at `index` is at its final sorted position.
26062562
///
26072563
/// This reordering has the additional property that any value at position `i < index` will be

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#![feature(is_sorted)]
4747
#![feature(pattern)]
4848
#![feature(sort_internals)]
49-
#![feature(slice_partition_at_index)]
5049
#![feature(slice_take)]
5150
#![feature(maybe_uninit_uninit_array)]
5251
#![feature(maybe_uninit_array_assume_init)]

0 commit comments

Comments
 (0)