Replace the tracking issue for the slice_group_by feature
This commit is contained in:
parent
a2d55d70c4
commit
8b53be6604
@ -110,7 +110,7 @@ pub use core::slice::{Chunks, Windows};
|
||||
pub use core::slice::{ChunksExact, ChunksExactMut};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::slice::{ChunksMut, Split, SplitMut};
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
pub use core::slice::{GroupBy, GroupByMut};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::slice::{Iter, IterMut};
|
||||
|
@ -2975,20 +2975,20 @@ unsafe impl<'a, T> TrustedRandomAccess for IterMut<'a, T> {
|
||||
///
|
||||
/// [`group_by`]: ../../std/primitive.slice.html#method.group_by
|
||||
/// [slices]: ../../std/primitive.slice.html
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
pub struct GroupBy<'a, T: 'a, P> {
|
||||
slice: &'a [T],
|
||||
predicate: P,
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a, P> GroupBy<'a, T, P> {
|
||||
pub(super) fn new(slice: &'a [T], predicate: P) -> Self {
|
||||
GroupBy { slice, predicate }
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a, P> Iterator for GroupBy<'a, T, P>
|
||||
where
|
||||
P: FnMut(&T, &T) -> bool,
|
||||
@ -3022,7 +3022,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a, P> DoubleEndedIterator for GroupBy<'a, T, P>
|
||||
where
|
||||
P: FnMut(&T, &T) -> bool,
|
||||
@ -3044,10 +3044,10 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a, P> FusedIterator for GroupBy<'a, T, P> where P: FnMut(&T, &T) -> bool {}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for GroupBy<'a, T, P> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("GroupBy").field("slice", &self.slice).finish()
|
||||
@ -3061,20 +3061,20 @@ impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for GroupBy<'a, T, P> {
|
||||
///
|
||||
/// [`group_by_mut`]: ../../std/primitive.slice.html#method.group_by_mut
|
||||
/// [slices]: ../../std/primitive.slice.html
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
pub struct GroupByMut<'a, T: 'a, P> {
|
||||
slice: &'a mut [T],
|
||||
predicate: P,
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a, P> GroupByMut<'a, T, P> {
|
||||
pub(super) fn new(slice: &'a mut [T], predicate: P) -> Self {
|
||||
GroupByMut { slice, predicate }
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a, P> Iterator for GroupByMut<'a, T, P>
|
||||
where
|
||||
P: FnMut(&T, &T) -> bool,
|
||||
@ -3109,7 +3109,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a, P> DoubleEndedIterator for GroupByMut<'a, T, P>
|
||||
where
|
||||
P: FnMut(&T, &T) -> bool,
|
||||
@ -3132,10 +3132,10 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a, P> FusedIterator for GroupByMut<'a, T, P> where P: FnMut(&T, &T) -> bool {}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for GroupByMut<'a, T, P> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("GroupByMut").field("slice", &self.slice).finish()
|
||||
|
@ -57,7 +57,7 @@ pub use iter::{ArrayChunks, ArrayChunksMut};
|
||||
#[unstable(feature = "array_windows", issue = "75027")]
|
||||
pub use iter::ArrayWindows;
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
pub use iter::{GroupBy, GroupByMut};
|
||||
|
||||
#[unstable(feature = "split_inclusive", issue = "72360")]
|
||||
@ -1246,7 +1246,7 @@ impl<T> [T] {
|
||||
/// assert_eq!(iter.next(), Some(&[2, 3, 4][..]));
|
||||
/// assert_eq!(iter.next(), None);
|
||||
/// ```
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
#[inline]
|
||||
pub fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F>
|
||||
where
|
||||
@ -1291,7 +1291,7 @@ impl<T> [T] {
|
||||
/// assert_eq!(iter.next(), Some(&mut [2, 3, 4][..]));
|
||||
/// assert_eq!(iter.next(), None);
|
||||
/// ```
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[unstable(feature = "slice_group_by", issue = "80552")]
|
||||
#[inline]
|
||||
pub fn group_by_mut<F>(&mut self, pred: F) -> GroupByMut<'_, T, F>
|
||||
where
|
||||
|
Loading…
Reference in New Issue
Block a user