Skip to content

Commit c5a9f1f

Browse files
committed
Basic documentation for inclusive range syntax
1 parent 58c701f commit c5a9f1f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/doc/unstable-book/src/inclusive-range-syntax.md

+10
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,15 @@ The tracking issue for this feature is: [#28237]
66

77
------------------------
88

9+
To get a range that goes from 0 to 10 and includes the value 10, you
10+
can write `0...10`:
911

12+
```rust
13+
#![feature(inclusive_range_syntax)]
1014

15+
fn main() {
16+
for i in 0...10 {
17+
println!("{}", i);
18+
}
19+
}
20+
```

0 commit comments

Comments
 (0)