Skip to content

Commit

Permalink
Basic documentation for inclusive range syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
shepmaster committed Mar 22, 2017
1 parent 58c701f commit c5a9f1f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/doc/unstable-book/src/inclusive-range-syntax.md
Expand Up @@ -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);
}
}
```

0 comments on commit c5a9f1f

Please sign in to comment.