Add a note about overflowing in the RangeFrom iterator

This commit is contained in:
Tobias Bucher 2016-03-29 23:21:13 +02:00
parent 525aa61022
commit 6acd90f0c9

View File

@ -1539,6 +1539,11 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
/// ///
/// See the [`contains()`](#method.contains) method for its characterization. /// See the [`contains()`](#method.contains) method for its characterization.
/// ///
/// Note: Currently, no overflow checking is done for the iterator
/// implementation; if you use an integer range and the integer overflows, it
/// might panic in debug mode or create an endless loop in release mode. This
/// overflow behavior might change in the future.
///
/// # Examples /// # Examples
/// ///
/// ``` /// ```