Add a note about overflowing in the RangeFrom
iterator
This commit is contained in:
parent
525aa61022
commit
6acd90f0c9
@ -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
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
Loading…
Reference in New Issue
Block a user