about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJake Goulding <jake.goulding@gmail.com>2017-03-22 13:39:17 -0400
committerJake Goulding <jake.goulding@gmail.com>2017-03-22 17:46:27 -0400
commitc5a9f1f3f6d36d6e48586d16fdc3a69e9c75781a (patch)
treec1c662e9fc7f38d447770be4fd75047dc86e9cba
parent58c701f5c7dc26d9b55c631006ece52abe1ddce2 (diff)
downloadrust-c5a9f1f3f6d36d6e48586d16fdc3a69e9c75781a.tar.gz
rust-c5a9f1f3f6d36d6e48586d16fdc3a69e9c75781a.zip
Basic documentation for inclusive range syntax
-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);
+    }
+}
+```