mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Add a tracking issue for Iterator::copied
This commit is contained in:
@@ -2257,7 +2257,7 @@ fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where
|
||||
/// 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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
@@ -548,7 +548,7 @@ fn fold<Acc, F>(self, init: Acc, mut f: F) -> Acc
|
||||
}
|
||||
}
|
||||
|
||||
#[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
|
||||
{
|
||||
@@ -569,7 +569,7 @@ fn rfold<Acc, F>(self, init: Acc, mut f: F) -> Acc
|
||||
}
|
||||
}
|
||||
|
||||
#[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
|
||||
{
|
||||
@@ -582,7 +582,7 @@ fn is_empty(&self) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
#[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
|
||||
{}
|
||||
@@ -601,7 +601,7 @@ fn may_have_side_effect() -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
#[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
|
||||
|
||||
Reference in New Issue
Block a user