From 6acd90f0c91bfdb5ab2678fadaa571096a78ee5f Mon Sep 17 00:00:00 2001 From: Tobias Bucher Date: Tue, 29 Mar 2016 23:21:13 +0200 Subject: [PATCH] Add a note about overflowing in the `RangeFrom` iterator --- src/libcore/ops.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 44c498ef6d4e0..a2f84230afc44 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -1539,6 +1539,11 @@ impl> Range { /// /// 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 /// /// ```