Skip to content

Commit 03d54a4

Browse files
authored
Rollup merge of rust-lang#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 ⚠️.
2 parents 2673b03 + c5a9f1f commit 03d54a4

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)