From 469b7fd1c09e5759f8cbce0f4e42be91c6f1b81a Mon Sep 17 00:00:00 2001
From: Matthew Piziak <matthew.piziak@gmail.com>
Date: Thu, 18 Aug 2016 16:12:40 -0400
Subject: [PATCH] split example into three sections with explanation

---
 src/libcore/ops.rs | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs
index cee374ccc7b..932e5f086cb 100644
--- a/src/libcore/ops.rs
+++ b/src/libcore/ops.rs
@@ -1462,13 +1462,24 @@ pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
 ///
 /// # Examples
 ///
+/// The `..` syntax is a `RangeFull`:
+///
 /// ```
 /// assert_eq!((..), std::ops::RangeFull);
+/// ```
 ///
-/// // for i in .. {
-/// //     println!("This errors because .. has no IntoIterator impl");
-/// // }
+/// It does not have an `IntoIterator` implementation, so you can't use it in a
+/// `for` loop directly. This won't compile:
 ///
+/// ```ignore
+/// for i in .. {
+///    // ...
+/// }
+/// ```
+///
+/// Used as a slicing index, `RangeFull` produces the full array as a slice.
+///
+/// ```
 /// let arr = [0, 1, 2, 3];
 /// assert_eq!(arr[ .. ], [0,1,2,3]);  // RangeFull
 /// assert_eq!(arr[ ..3], [0,1,2  ]);