Skip to content

Commit

Permalink
Remove deprecated and unstable slice_partition_at_index functions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
est31 committed Jan 30, 2022
1 parent 7cc28c1 commit 105a746
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
44 changes: 0 additions & 44 deletions library/core/src/slice/mod.rs
Expand Up @@ -2558,50 +2558,6 @@ impl<T> [T] {
sort::quicksort(self, |a, b| f(a).lt(&f(b)));
}

/// Reorder the slice such that the element at `index` is at its final sorted position.
#[unstable(feature = "slice_partition_at_index", issue = "55300")]
#[rustc_deprecated(since = "1.49.0", reason = "use the select_nth_unstable() instead")]
#[inline]
pub fn partition_at_index(&mut self, index: usize) -> (&mut [T], &mut T, &mut [T])
where
T: Ord,
{
self.select_nth_unstable(index)
}

/// Reorder the slice with a comparator function such that the element at `index` is at its
/// final sorted position.
#[unstable(feature = "slice_partition_at_index", issue = "55300")]
#[rustc_deprecated(since = "1.49.0", reason = "use select_nth_unstable_by() instead")]
#[inline]
pub fn partition_at_index_by<F>(
&mut self,
index: usize,
compare: F,
) -> (&mut [T], &mut T, &mut [T])
where
F: FnMut(&T, &T) -> Ordering,
{
self.select_nth_unstable_by(index, compare)
}

/// Reorder the slice with a key extraction function such that the element at `index` is at its
/// final sorted position.
#[unstable(feature = "slice_partition_at_index", issue = "55300")]
#[rustc_deprecated(since = "1.49.0", reason = "use the select_nth_unstable_by_key() instead")]
#[inline]
pub fn partition_at_index_by_key<K, F>(
&mut self,
index: usize,
f: F,
) -> (&mut [T], &mut T, &mut [T])
where
F: FnMut(&T) -> K,
K: Ord,
{
self.select_nth_unstable_by_key(index, f)
}

/// Reorder the slice such that the element at `index` is at its final sorted position.
///
/// This reordering has the additional property that any value at position `i < index` will be
Expand Down
1 change: 0 additions & 1 deletion library/core/tests/lib.rs
Expand Up @@ -46,7 +46,6 @@
#![feature(is_sorted)]
#![feature(pattern)]
#![feature(sort_internals)]
#![feature(slice_partition_at_index)]
#![feature(slice_take)]
#![feature(maybe_uninit_uninit_array)]
#![feature(maybe_uninit_array_assume_init)]
Expand Down

0 comments on commit 105a746

Please sign in to comment.