Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix since of Iterator::flatten to be a proper semver
  • Loading branch information
matklad committed Aug 15, 2018
1 parent 81cfaad commit 1a0d3f0
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
Expand Up @@ -1110,7 +1110,7 @@ pub trait Iterator {
///
/// [`flat_map()`]: #method.flat_map
#[inline]
#[stable(feature = "iterator_flatten", since = "1.29")]
#[stable(feature = "iterator_flatten", since = "1.29.0")]
fn flatten(self) -> Flatten<Self>
where Self: Sized, Self::Item: IntoIterator {
Flatten { inner: flatten_compat(self) }
Expand Down
12 changes: 6 additions & 6 deletions src/libcore/iter/mod.rs
Expand Up @@ -2577,13 +2577,13 @@ impl<I, U, F> FusedIterator for FlatMap<I, U, F>
/// [`flatten`]: trait.Iterator.html#method.flatten
/// [`Iterator`]: trait.Iterator.html
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
#[stable(feature = "iterator_flatten", since = "1.29")]
#[stable(feature = "iterator_flatten", since = "1.29.0")]
pub struct Flatten<I: Iterator>
where I::Item: IntoIterator {
inner: FlattenCompat<I, <I::Item as IntoIterator>::IntoIter>,
}

#[stable(feature = "iterator_flatten", since = "1.29")]
#[stable(feature = "iterator_flatten", since = "1.29.0")]
impl<I, U> fmt::Debug for Flatten<I>
where I: Iterator + fmt::Debug, U: Iterator + fmt::Debug,
I::Item: IntoIterator<IntoIter = U, Item = U::Item>,
Expand All @@ -2593,15 +2593,15 @@ impl<I, U> fmt::Debug for Flatten<I>
}
}

#[stable(feature = "iterator_flatten", since = "1.29")]
#[stable(feature = "iterator_flatten", since = "1.29.0")]
impl<I, U> Clone for Flatten<I>
where I: Iterator + Clone, U: Iterator + Clone,
I::Item: IntoIterator<IntoIter = U, Item = U::Item>,
{
fn clone(&self) -> Self { Flatten { inner: self.inner.clone() } }
}

#[stable(feature = "iterator_flatten", since = "1.29")]
#[stable(feature = "iterator_flatten", since = "1.29.0")]
impl<I, U> Iterator for Flatten<I>
where I: Iterator, U: Iterator,
I::Item: IntoIterator<IntoIter = U, Item = U::Item>
Expand Down Expand Up @@ -2629,7 +2629,7 @@ impl<I, U> Iterator for Flatten<I>
}
}

#[stable(feature = "iterator_flatten", since = "1.29")]
#[stable(feature = "iterator_flatten", since = "1.29.0")]
impl<I, U> DoubleEndedIterator for Flatten<I>
where I: DoubleEndedIterator, U: DoubleEndedIterator,
I::Item: IntoIterator<IntoIter = U, Item = U::Item>
Expand All @@ -2652,7 +2652,7 @@ impl<I, U> DoubleEndedIterator for Flatten<I>
}
}

#[stable(feature = "iterator_flatten", since = "1.29")]
#[stable(feature = "iterator_flatten", since = "1.29.0")]
impl<I, U> FusedIterator for Flatten<I>
where I: FusedIterator, U: Iterator,
I::Item: IntoIterator<IntoIter = U, Item = U::Item> {}
Expand Down

0 comments on commit 1a0d3f0

Please sign in to comment.