about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/unstable-book/src/inclusive-range-syntax.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/inclusive-range-syntax.md b/src/doc/unstable-book/src/inclusive-range-syntax.md
index 74d85536399..255445c318d 100644
--- a/src/doc/unstable-book/src/inclusive-range-syntax.md
+++ b/src/doc/unstable-book/src/inclusive-range-syntax.md
@@ -6,5 +6,15 @@ The tracking issue for this feature is: [#28237]
 
 ------------------------
 
+To get a range that goes from 0 to 10 and includes the value 10, you
+can write `0...10`:
 
+```rust
+#![feature(inclusive_range_syntax)]
 
+fn main() {
+    for i in 0...10 {
+        println!("{}", i);
+    }
+}
+```