core: Stabilize FusedIterator
FusedIterator is a marker trait that promises that the implementing iterator continues to return `None` from `.next()` once it has returned `None` once (and/or `.next_back()`, if implemented). The effects of FusedIterator are already widely available through `.fuse()`, but with stable `FusedIterator`, stable Rust users can implement this trait for their iterators when appropriate.
This commit is contained in:
parent
c9b86a9178
commit
bc651cac8d
28 changed files with 110 additions and 114 deletions
|
@ -2389,7 +2389,7 @@ impl<T> ExactSizeIterator for IntoIter<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
#[stable(feature = "fused", since = "1.25.0")]
|
||||
impl<T> FusedIterator for IntoIter<T> {}
|
||||
|
||||
#[unstable(feature = "trusted_len", issue = "37572")]
|
||||
|
@ -2495,7 +2495,7 @@ impl<'a, T> ExactSizeIterator for Drain<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
#[stable(feature = "fused", since = "1.25.0")]
|
||||
impl<'a, T> FusedIterator for Drain<'a, T> {}
|
||||
|
||||
/// A place for insertion at the back of a `Vec`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue