-/// Conversion from an `Iterator`.
+/// Conversion from an [`Iterator`].
///
/// By implementing `FromIterator` for a type, you define how it will be
/// created from an iterator. This is common for types which describe a
/// collection of some kind.
///
-/// `FromIterator`'s [`from_iter`] is rarely called explicitly, and is instead
-/// used through [`Iterator`]'s [`collect`] method. See [`collect`]'s
+/// [`FromIterator::from_iter()`] is rarely called explicitly, and is instead
+/// used through [`Iterator::collect()`] method. See [`Iterator::collect()`]'s
/// documentation for more examples.
///
-/// [`from_iter`]: #tymethod.from_iter
-/// [`Iterator`]: trait.Iterator.html
-/// [`collect`]: trait.Iterator.html#method.collect
-///
/// See also: [`IntoIterator`].
///
-/// [`IntoIterator`]: trait.IntoIterator.html
-///
/// # Examples
///
/// Basic usage:
/// assert_eq!(v, vec![5, 5, 5, 5, 5]);
/// ```
///
-/// Using [`collect`] to implicitly use `FromIterator`:
+/// Using [`Iterator::collect()`] to implicitly use `FromIterator`:
///
/// ```
/// let five_fives = std::iter::repeat(5).take(5);
fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self;
}
-/// Conversion into an `Iterator`.
+/// Conversion into an [`Iterator`].
///
/// By implementing `IntoIterator` for a type, you define how it will be
/// converted to an iterator. This is common for types which describe a
///
/// See also: [`FromIterator`].
///
-/// [`FromIterator`]: trait.FromIterator.html
-///
/// # Examples
///
/// Basic usage:
/// assert_eq!(Some(3), iter.next());
/// assert_eq!(None, iter.next());
/// ```
- #[cfg_attr(not(bootstrap), lang = "into_iter")]
+ #[lang = "into_iter"]
#[stable(feature = "rust1", since = "1.0.0")]
fn into_iter(self) -> Self::IntoIter;
}
/// As this is the only required method for this trait, the [trait-level] docs
/// contain more details.
///
- /// [trait-level]: trait.Extend.html
+ /// [trait-level]: Extend
///
/// # Examples
///