Skip to content

Commit 7ee4386

Browse files
Add missing urls for Sum and Product traits
1 parent 38a959a commit 7ee4386

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/libcore/iter/traits.rs

+16-8
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,14 @@ impl<'a, I: ExactSizeIterator + ?Sized> ExactSizeIterator for &'a mut I {}
556556

557557
/// Trait to represent types that can be created by summing up an iterator.
558558
///
559-
/// This trait is used to implement the `sum` method on iterators. Types which
560-
/// implement the trait can be generated by the `sum` method. Like
561-
/// `FromIterator` this trait should rarely be called directly and instead
562-
/// interacted with through `Iterator::sum`.
559+
/// This trait is used to implement the [`sum()`] method on iterators. Types which
560+
/// implement the trait can be generated by the [`sum()`] method. Like
561+
/// [`FromIterator`] this trait should rarely be called directly and instead
562+
/// interacted with through [`Iterator::sum()`].
563+
///
564+
/// [`sum()`]: ../../std/iter/trait.Sum.html#tymethod.sum
565+
/// [`FromIterator`]: ../../std/iter/trait.FromIterator.html
566+
/// [`Iterator::sum()`]: ../../std/iter/trait.Iterator.html#method.sum
563567
#[stable(feature = "iter_arith_traits", since = "1.12.0")]
564568
pub trait Sum<A = Self>: Sized {
565569
/// Method which takes an iterator and generates `Self` from the elements by
@@ -571,10 +575,14 @@ pub trait Sum<A = Self>: Sized {
571575
/// Trait to represent types that can be created by multiplying elements of an
572576
/// iterator.
573577
///
574-
/// This trait is used to implement the `product` method on iterators. Types
575-
/// which implement the trait can be generated by the `product` method. Like
576-
/// `FromIterator` this trait should rarely be called directly and instead
577-
/// interacted with through `Iterator::product`.
578+
/// This trait is used to implement the [`product()`] method on iterators. Types
579+
/// which implement the trait can be generated by the [`product()`] method. Like
580+
/// [`FromIterator`] this trait should rarely be called directly and instead
581+
/// interacted with through [`Iterator::product()`].
582+
///
583+
/// [`product()`]: ../../std/iter/trait.Product.html#tymethod.product
584+
/// [`FromIterator`]: ../../std/iter/trait.FromIterator.html
585+
/// [`Iterator::product()`]: ../../std/iter/trait.Iterator.html#method.product
578586
#[stable(feature = "iter_arith_traits", since = "1.12.0")]
579587
pub trait Product<A = Self>: Sized {
580588
/// Method which takes an iterator and generates `Self` from the elements by

0 commit comments

Comments
 (0)