about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-04-13 14:26:10 -0700
committerbors <bors@rust-lang.org>2016-04-13 14:26:10 -0700
commit2b6020723115e77ebe94f228c0c9b977b9199c6e (patch)
treef6d50ba49f22276cf9a14b7903eef18416173de8
parent35dca7fb7b7304cfa8da027d1be6eea7142d90d6 (diff)
parent6acd90f0c91bfdb5ab2678fadaa571096a78ee5f (diff)
downloadrust-2b6020723115e77ebe94f228c0c9b977b9199c6e.tar.gz
rust-2b6020723115e77ebe94f228c0c9b977b9199c6e.zip
Auto merge of #32592 - tbu-:pr_range_from_overflow, r=alexcrichton
Add a note about overflowing in the `RangeFrom` iterator
-rw-r--r--src/libcore/ops.rs5
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
 ///
 /// ```