File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
library/core/src/iter/traits Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -3366,6 +3366,9 @@ pub trait Iterator {
33663366 ///
33673367 /// An empty iterator returns the zero value of the type.
33683368 ///
3369+ /// `sum()` can be used to sum any type implementing [`Sum`][`core::iter::Sum`],
3370+ /// including [`Option`][`Option::sum`] and [`Result`][`Result::sum`].
3371+ ///
33693372 /// # Panics
33703373 ///
33713374 /// When calling `sum()` and a primitive integer type is being returned, this
@@ -3395,6 +3398,9 @@ pub trait Iterator {
33953398 ///
33963399 /// An empty iterator returns the one value of the type.
33973400 ///
3401+ /// `product()` can be used to multiply any type implementing [`Product`][`core::iter::Product`],
3402+ /// including [`Option`][`Option::product`] and [`Result`][`Result::product`].
3403+ ///
33983404 /// # Panics
33993405 ///
34003406 /// When calling `product()` and a primitive integer type is being returned,
You can’t perform that action at this time.
0 commit comments