about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-03-25 09:30:30 -0700
committerGitHub <noreply@github.com>2017-03-25 09:30:30 -0700
commit03d54a4f06980a0605b957066f825f7cdbc91c80 (patch)
tree730ce4b37624fc5310b498d3785635ed51542e61
parent2673b03d65f1d784fc7d72f3af11321362c04786 (diff)
parentc5a9f1f3f6d36d6e48586d16fdc3a69e9c75781a (diff)
downloadrust-03d54a4f06980a0605b957066f825f7cdbc91c80.tar.gz
rust-03d54a4f06980a0605b957066f825f7cdbc91c80.zip
Rollup merge of #40740 - shepmaster:inclusive-range-unstable-doc, r=steveklabnik
Basic documentation for inclusive range syntax

Done so that we can remove mention of this from the stable documentation ⚠️.
-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);
+    }
+}
+```