Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/libcore/iter/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use fmt;
use marker;
use usize;

use super::FusedIterator;
use super::{FusedIterator, TrustedLen};

/// An iterator that repeats an element endlessly.
///
Expand Down Expand Up @@ -138,6 +138,9 @@ impl<T> ExactSizeIterator for Empty<T> {
}
}

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

#[unstable(feature = "fused", issue = "35602")]
impl<T> FusedIterator for Empty<T> {}

Expand Down Expand Up @@ -216,6 +219,9 @@ impl<T> ExactSizeIterator for Once<T> {
}
}

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

#[unstable(feature = "fused", issue = "35602")]
impl<T> FusedIterator for Once<T> {}

Expand Down