Skip to content

Commit

Permalink
Link the tracking issue for TrustedLen
Browse files Browse the repository at this point in the history
  • Loading branch information
bluss committed Nov 4, 2016
1 parent 5dc9db5 commit f0e6b90
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,7 @@ impl<T> ExactSizeIterator for IntoIter<T> {}
#[unstable(feature = "fused", issue = "35602")]
impl<T> FusedIterator for IntoIter<T> {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<T> TrustedLen for IntoIter<T> {}

#[stable(feature = "vec_into_iter_clone", since = "1.8.0")]
Expand Down
14 changes: 7 additions & 7 deletions src/libcore/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ pub use self::traits::{FromIterator, IntoIterator, DoubleEndedIterator, Extend};
pub use self::traits::{ExactSizeIterator, Sum, Product};
#[unstable(feature = "fused", issue = "35602")]
pub use self::traits::FusedIterator;
#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
pub use self::traits::TrustedLen;

mod iterator;
Expand Down Expand Up @@ -374,7 +374,7 @@ impl<I> ExactSizeIterator for Rev<I>
impl<I> FusedIterator for Rev<I>
where I: FusedIterator + DoubleEndedIterator {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<I> TrustedLen for Rev<I>
where I: TrustedLen + DoubleEndedIterator {}

Expand Down Expand Up @@ -438,7 +438,7 @@ unsafe impl<'a, I, T: 'a> TrustedRandomAccess for Cloned<I>
fn may_have_side_effect() -> bool { true }
}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, I, T: 'a> TrustedLen for Cloned<I>
where I: TrustedLen<Item=&'a T>,
T: Clone
Expand Down Expand Up @@ -654,7 +654,7 @@ impl<A, B> FusedIterator for Chain<A, B>
B: FusedIterator<Item=A::Item>,
{}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<A, B> TrustedLen for Chain<A, B>
where A: TrustedLen, B: TrustedLen<Item=A::Item>,
{}
Expand Down Expand Up @@ -876,7 +876,7 @@ unsafe impl<A, B> TrustedRandomAccess for Zip<A, B>
impl<A, B> FusedIterator for Zip<A, B>
where A: FusedIterator, B: FusedIterator, {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<A, B> TrustedLen for Zip<A, B>
where A: TrustedLen, B: TrustedLen,
{}
Expand Down Expand Up @@ -981,7 +981,7 @@ impl<B, I: ExactSizeIterator, F> ExactSizeIterator for Map<I, F>
impl<B, I: FusedIterator, F> FusedIterator for Map<I, F>
where F: FnMut(I::Item) -> B {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<B, I, F> TrustedLen for Map<I, F>
where I: TrustedLen,
F: FnMut(I::Item) -> B {}
Expand Down Expand Up @@ -1222,7 +1222,7 @@ unsafe impl<I> TrustedRandomAccess for Enumerate<I>
#[unstable(feature = "fused", issue = "35602")]
impl<I> FusedIterator for Enumerate<I> where I: FusedIterator {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<I> TrustedLen for Enumerate<I>
where I: TrustedLen,
{}
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/iter/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ macro_rules! range_incl_exact_iter_impl {

macro_rules! range_trusted_len_impl {
($($t:ty)*) => ($(
#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl TrustedLen for ops::Range<$t> { }
)*)
}
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/iter/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,8 @@ impl<'a, I: FusedIterator + ?Sized> FusedIterator for &'a mut I {}
///
/// This trait must only be implemented when the contract is upheld.
/// Consumers of this trait must inspect `.size_hint()`’s upper bound.
#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
pub unsafe trait TrustedLen : Iterator {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, I: TrustedLen + ?Sized> TrustedLen for &'a mut I {}
6 changes: 3 additions & 3 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ impl<'a, A> ExactSizeIterator for Iter<'a, A> {}
#[unstable(feature = "fused", issue = "35602")]
impl<'a, A> FusedIterator for Iter<'a, A> {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, A> TrustedLen for Iter<'a, A> {}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -872,7 +872,7 @@ impl<'a, A> ExactSizeIterator for IterMut<'a, A> {}

#[unstable(feature = "fused", issue = "35602")]
impl<'a, A> FusedIterator for IterMut<'a, A> {}
#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {}

/// An iterator over the item contained inside an [`Option`].
Expand Down Expand Up @@ -904,7 +904,7 @@ impl<A> ExactSizeIterator for IntoIter<A> {}
#[unstable(feature = "fused", issue = "35602")]
impl<A> FusedIterator for IntoIter<A> {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<A> TrustedLen for IntoIter<A> {}

/////////////////////////////////////////////////////////////////////////////
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
#[unstable(feature = "fused", issue = "35602")]
impl<'a, T> FusedIterator for Iter<'a, T> {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, A> TrustedLen for Iter<'a, A> {}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -927,7 +927,7 @@ impl<'a, T> ExactSizeIterator for IterMut<'a, T> {}
#[unstable(feature = "fused", issue = "35602")]
impl<'a, T> FusedIterator for IterMut<'a, T> {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {}

/// An iterator over the value in a [`Ok`] variant of a [`Result`]. This struct is
Expand Down Expand Up @@ -967,7 +967,7 @@ impl<T> ExactSizeIterator for IntoIter<T> {}
#[unstable(feature = "fused", issue = "35602")]
impl<T> FusedIterator for IntoIter<T> {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<A> TrustedLen for IntoIter<A> {}

/////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
#[unstable(feature = "fused", issue = "35602")]
impl<'a, T> FusedIterator for Iter<'a, T> {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, T> TrustedLen for Iter<'a, T> {}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1112,7 +1112,7 @@ impl<'a, T> ExactSizeIterator for IterMut<'a, T> {}
#[unstable(feature = "fused", issue = "35602")]
impl<'a, T> FusedIterator for IterMut<'a, T> {}

#[unstable(feature = "trusted_len", issue = "0")]
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, T> TrustedLen for IterMut<'a, T> {}

/// An internal abstraction over the splitting iterators, so that
Expand Down

0 comments on commit f0e6b90

Please sign in to comment.