diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2016-03-29 23:21:13 +0200 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2016-04-13 20:09:15 +0200 |
| commit | 6acd90f0c91bfdb5ab2678fadaa571096a78ee5f (patch) | |
| tree | 39ef350627254f4c0a92b49eb3c9791a16e82c2c /src | |
| parent | 525aa6102250ec2a33c7066dfb966524f0ce3e21 (diff) | |
Add a note about overflowing in the `RangeFrom` iterator
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/ops.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 44c498ef6d4..a2f84230afc 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -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 /// /// ``` |
