Skip to content

Commit

Permalink
Add a tracking issue for Iterator::copied
Browse files Browse the repository at this point in the history
  • Loading branch information
KamilaBorowska committed Dec 26, 2018
1 parent 2fcdc9c commit 315401d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/libcore/iter/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@ pub trait Iterator {
/// assert_eq!(v_cloned, vec![1, 2, 3]);
/// assert_eq!(v_map, vec![1, 2, 3]);
/// ```
#[unstable(feature = "iter_copied", issue = "0")]
#[unstable(feature = "iter_copied", issue = "57127")]
fn copied<'a, T: 'a>(self) -> Copied<Self>
where Self: Sized + Iterator<Item=&'a T>, T: Copy
{
Expand Down
12 changes: 6 additions & 6 deletions src/libcore/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,14 +514,14 @@ unsafe impl<I> TrustedLen for Rev<I>
///
/// [`copied`]: trait.Iterator.html#method.copied
/// [`Iterator`]: trait.Iterator.html
#[unstable(feature = "iter_copied", issue = "0")]
#[unstable(feature = "iter_copied", issue = "57127")]
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
#[derive(Clone, Debug)]
pub struct Copied<I> {
it: I,
}

#[unstable(feature = "iter_copied", issue = "0")]
#[unstable(feature = "iter_copied", issue = "57127")]
impl<'a, I, T: 'a> Iterator for Copied<I>
where I: Iterator<Item=&'a T>, T: Copy
{
Expand All @@ -548,7 +548,7 @@ impl<'a, I, T: 'a> Iterator for Copied<I>
}
}

#[unstable(feature = "iter_copied", issue = "0")]
#[unstable(feature = "iter_copied", issue = "57127")]
impl<'a, I, T: 'a> DoubleEndedIterator for Copied<I>
where I: DoubleEndedIterator<Item=&'a T>, T: Copy
{
Expand All @@ -569,7 +569,7 @@ impl<'a, I, T: 'a> DoubleEndedIterator for Copied<I>
}
}

#[unstable(feature = "iter_copied", issue = "0")]
#[unstable(feature = "iter_copied", issue = "57127")]
impl<'a, I, T: 'a> ExactSizeIterator for Copied<I>
where I: ExactSizeIterator<Item=&'a T>, T: Copy
{
Expand All @@ -582,7 +582,7 @@ impl<'a, I, T: 'a> ExactSizeIterator for Copied<I>
}
}

#[unstable(feature = "iter_copied", issue = "0")]
#[unstable(feature = "iter_copied", issue = "57127")]
impl<'a, I, T: 'a> FusedIterator for Copied<I>
where I: FusedIterator<Item=&'a T>, T: Copy
{}
Expand All @@ -601,7 +601,7 @@ unsafe impl<'a, I, T: 'a> TrustedRandomAccess for Copied<I>
}
}

#[unstable(feature = "iter_copied", issue = "0")]
#[unstable(feature = "iter_copied", issue = "57127")]
unsafe impl<'a, I, T: 'a> TrustedLen for Copied<I>
where I: TrustedLen<Item=&'a T>,
T: Copy
Expand Down

0 comments on commit 315401d

Please sign in to comment.