diff options
| author | Jake Goulding <jake.goulding@gmail.com> | 2017-03-22 13:39:17 -0400 |
|---|---|---|
| committer | Jake Goulding <jake.goulding@gmail.com> | 2017-03-22 17:46:27 -0400 |
| commit | c5a9f1f3f6d36d6e48586d16fdc3a69e9c75781a (patch) | |
| tree | c1c662e9fc7f38d447770be4fd75047dc86e9cba | |
| parent | 58c701f5c7dc26d9b55c631006ece52abe1ddce2 (diff) | |
| download | rust-c5a9f1f3f6d36d6e48586d16fdc3a69e9c75781a.tar.gz rust-c5a9f1f3f6d36d6e48586d16fdc3a69e9c75781a.zip | |
Basic documentation for inclusive range syntax
| -rw-r--r-- | src/doc/unstable-book/src/inclusive-range-syntax.md | 10 |
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); + } +} +``` |
