Auto merge of #32592 - tbu-:pr_range_from_overflow, r=alexcrichton

Add a note about overflowing in the `RangeFrom` iterator
This commit is contained in:
bors 2016-04-13 14:26:10 -07:00
commit 2b60207231

View File

@ -1539,6 +1539,11 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
///
/// 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
///
/// ```