about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2016-11-12 10:38:41 +0200
committerGitHub <noreply@github.com>2016-11-12 10:38:41 +0200
commit67ef819c0933aa9ff472414618d9655d41a4cd0d (patch)
tree0ca9b3892541a70631c824e9f3daef4782430227 /src/libcore
parent1187ecf5728335fa8638bab2a675c504fa5f24e5 (diff)
parentc67ff64b6fb57313c81e241f6a16b60783ffbb95 (diff)
downloadrust-67ef819c0933aa9ff472414618d9655d41a4cd0d.tar.gz
rust-67ef819c0933aa9ff472414618d9655d41a4cd0d.zip
Rollup merge of #37669 - GuillaumeGomez:always_urls, r=brson
Add missing urls for FusedIterator and TrustedLen traits

r? @steveklabnik
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/iter/traits.rs22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/libcore/iter/traits.rs b/src/libcore/iter/traits.rs
index 9d402971d18..e94582cda7c 100644
--- a/src/libcore/iter/traits.rs
+++ b/src/libcore/iter/traits.rs
@@ -666,13 +666,17 @@ float_sum_product! { f32 f64 }
 /// An iterator that always continues to yield `None` when exhausted.
 ///
 /// Calling next on a fused iterator that has returned `None` once is guaranteed
-/// to return `None` again. This trait is should be implemented by all iterators
+/// to return [`None`] again. This trait is should be implemented by all iterators
 /// that behave this way because it allows for some significant optimizations.
 ///
 /// Note: In general, you should not use `FusedIterator` in generic bounds if
-/// you need a fused iterator. Instead, you should just call `Iterator::fused()`
-/// on the iterator. If the iterator is already fused, the additional `Fuse`
+/// you need a fused iterator. Instead, you should just call [`Iterator::fuse()`]
+/// on the iterator. If the iterator is already fused, the additional [`Fuse`]
 /// wrapper will be a no-op with no performance penalty.
+///
+/// [`None`]: ../../std/option/enum.Option.html#variant.None
+/// [`Iterator::fuse()`]: ../../std/iter/trait.Iterator.html#method.fuse
+/// [`Fuse`]: ../../std/iter/struct.Fuse.html
 #[unstable(feature = "fused", issue = "35602")]
 pub trait FusedIterator: Iterator {}
 
@@ -682,16 +686,20 @@ impl<'a, I: FusedIterator + ?Sized> FusedIterator for &'a mut I {}
 /// An iterator that reports an accurate length using size_hint.
 ///
 /// The iterator reports a size hint where it is either exact
-/// (lower bound is equal to upper bound), or the upper bound is `None`.
-/// The upper bound must only be `None` if the actual iterator length is
-/// larger than `usize::MAX`.
+/// (lower bound is equal to upper bound), or the upper bound is [`None`].
+/// The upper bound must only be [`None`] if the actual iterator length is
+/// larger than [`usize::MAX`].
 ///
 /// The iterator must produce exactly the number of elements it reported.
 ///
 /// # Safety
 ///
 /// This trait must only be implemented when the contract is upheld.
-/// Consumers of this trait must inspect `.size_hint()`’s upper bound.
+/// Consumers of this trait must inspect [`.size_hint()`]’s upper bound.
+///
+/// [`None`]: ../../std/option/enum.Option.html#variant.None
+/// [`usize::MAX`]: ../../std/usize/constant.MAX.html
+/// [`.size_hint()`]: ../../std/iter/trait.Iterator.html#method.size_hint
 #[unstable(feature = "trusted_len", issue = "37572")]
 pub unsafe trait TrustedLen : Iterator {}