mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
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:
commit
2b60207231
@ -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
|
||||
///
|
||||
/// ```
|
||||
|
Loading…
Reference in New Issue
Block a user