Skip to content

Commit

Permalink
Add doc comments mentioning unspecified behaviour upon exhaustion
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed May 17, 2018
1 parent 1b3ecbc commit ff0f00d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/libcore/ops/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ impl<Idx> RangeInclusive<Idx> {
/// whether the inclusive range is empty, use the [`is_empty()`] method
/// instead of comparing `start() > end()`.
///
/// Note: the value returned by this method is unspecified after the range
/// has been iterated to exhaustion.
///
/// [`end()`]: #method.end
/// [`is_empty()`]: #method.is_empty
///
Expand All @@ -381,6 +384,9 @@ impl<Idx> RangeInclusive<Idx> {
/// whether the inclusive range is empty, use the [`is_empty()`] method
/// instead of comparing `start() > end()`.
///
/// Note: the value returned by this method is unspecified after the range
/// has been iterated to exhaustion.
///
/// [`start()`]: #method.start
/// [`is_empty()`]: #method.is_empty
///
Expand All @@ -395,7 +401,10 @@ impl<Idx> RangeInclusive<Idx> {
&self.end
}

/// Destructures the RangeInclusive into (lower bound, upper (inclusive) bound).
/// Destructures the `RangeInclusive` into (lower bound, upper (inclusive) bound).
///
/// Note: the value returned by this method is unspecified after the range
/// has been iterated to exhaustion.
///
/// # Examples
///
Expand Down

0 comments on commit ff0f00d

Please sign in to comment.