diff options
| author | Steven Fackler <sfackler@gmail.com> | 2016-09-09 20:39:49 -0700 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2016-09-10 10:06:33 -0700 |
| commit | 63fecad2e7c1f58e962a100d4159ddd47ebc627f (patch) | |
| tree | e81b9f0c4601dfe0f83c204d156f986d72ee3377 /src/libcore/iter/iterator.rs | |
| parent | f1f40f850e2546c2c187514e3d61d17544ba433f (diff) | |
| download | rust-63fecad2e7c1f58e962a100d4159ddd47ebc627f.tar.gz rust-63fecad2e7c1f58e962a100d4159ddd47ebc627f.zip | |
Inherit overflow checks for sum and product
Diffstat (limited to 'src/libcore/iter/iterator.rs')
| -rw-r--r-- | src/libcore/iter/iterator.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs index 6b616f80181..0e74bbe9c26 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/iterator.rs @@ -1867,7 +1867,8 @@ pub trait Iterator { /// # Panics /// /// When calling `sum` and a primitive integer type is being returned, this - /// method will panic if the computation overflows. + /// method will panic if the computation overflows and debug assertions are + /// enabled. /// /// # Examples /// @@ -1894,7 +1895,8 @@ pub trait Iterator { /// # Panics /// /// When calling `product` and a primitive integer type is being returned, - /// this method will panic if the computation overflows. + /// method will panic if the computation overflows and debug assertions are + /// enabled. /// /// # Examples /// |
