File tree 1 file changed +6
-0
lines changed
library/core/src/iter/traits
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -3366,6 +3366,9 @@ pub trait Iterator {
3366
3366
///
3367
3367
/// An empty iterator returns the zero value of the type.
3368
3368
///
3369
+ /// `sum()` can be used to sum any type implementing [`Sum`][`core::iter::Sum`],
3370
+ /// including [`Option`][`Option::sum`] and [`Result`][`Result::sum`].
3371
+ ///
3369
3372
/// # Panics
3370
3373
///
3371
3374
/// When calling `sum()` and a primitive integer type is being returned, this
@@ -3395,6 +3398,9 @@ pub trait Iterator {
3395
3398
///
3396
3399
/// An empty iterator returns the one value of the type.
3397
3400
///
3401
+ /// `product()` can be used to multiply any type implementing [`Product`][`core::iter::Product`],
3402
+ /// including [`Option`][`Option::product`] and [`Result`][`Result::product`].
3403
+ ///
3398
3404
/// # Panics
3399
3405
///
3400
3406
/// When calling `product()` and a primitive integer type is being returned,
You can’t perform that action at this time.
0 commit comments