@@ -666,13 +666,17 @@ float_sum_product! { f32 f64 }
666
666
/// An iterator that always continues to yield `None` when exhausted.
667
667
///
668
668
/// Calling next on a fused iterator that has returned `None` once is guaranteed
669
- /// to return `None` again. This trait is should be implemented by all iterators
669
+ /// to return [ `None`] again. This trait is should be implemented by all iterators
670
670
/// that behave this way because it allows for some significant optimizations.
671
671
///
672
672
/// Note: In general, you should not use `FusedIterator` in generic bounds if
673
- /// you need a fused iterator. Instead, you should just call `Iterator::fused ()`
674
- /// on the iterator. If the iterator is already fused, the additional `Fuse`
673
+ /// you need a fused iterator. Instead, you should just call [ `Iterator::fuse ()`]
674
+ /// on the iterator. If the iterator is already fused, the additional [ `Fuse`]
675
675
/// wrapper will be a no-op with no performance penalty.
676
+ ///
677
+ /// [`None`]: ../../std/option/enum.Option.html#variant.None
678
+ /// [`Iterator::fuse()`]: ../../std/iter/trait.Iterator.html#method.fuse
679
+ /// [`Fuse`]: ../../std/iter/struct.Fuse.html
676
680
#[ unstable( feature = "fused" , issue = "35602" ) ]
677
681
pub trait FusedIterator : Iterator { }
678
682
@@ -682,16 +686,20 @@ impl<'a, I: FusedIterator + ?Sized> FusedIterator for &'a mut I {}
682
686
/// An iterator that reports an accurate length using size_hint.
683
687
///
684
688
/// The iterator reports a size hint where it is either exact
685
- /// (lower bound is equal to upper bound), or the upper bound is `None`.
686
- /// The upper bound must only be `None` if the actual iterator length is
687
- /// larger than `usize::MAX`.
689
+ /// (lower bound is equal to upper bound), or the upper bound is [ `None`] .
690
+ /// The upper bound must only be [ `None`] if the actual iterator length is
691
+ /// larger than [ `usize::MAX`] .
688
692
///
689
693
/// The iterator must produce exactly the number of elements it reported.
690
694
///
691
695
/// # Safety
692
696
///
693
697
/// This trait must only be implemented when the contract is upheld.
694
- /// Consumers of this trait must inspect `.size_hint()`’s upper bound.
698
+ /// Consumers of this trait must inspect [`.size_hint()`]’s upper bound.
699
+ ///
700
+ /// [`None`]: ../../std/option/enum.Option.html#variant.None
701
+ /// [`usize::MAX`]: ../../std/usize/constant.MAX.html
702
+ /// [`.size_hint()`]: ../../std/iter/trait.Iterator.html#method.size_hint
695
703
#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
696
704
pub unsafe trait TrustedLen : Iterator { }
697
705
0 commit comments