Skip to content

Commit 45d9dd6

Browse files
Satisfy unstable book lint
1 parent a3bb9fb commit 45d9dd6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/doc/unstable-book/src/language-features/exclusive-range-pattern.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ stabilized.
1717

1818
```rust
1919
#![feature(exclusive_range_pattern)]
20+
let x = 5;
2021
match x {
2122
0..10 => println!("single digit"),
2223
10 => println!("ten isn't part of the above range"),

src/doc/unstable-book/src/language-features/half-open-range-patterns.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ stabilized.
1818
```rust
1919
#![feature(half_open_range_patterns)]
2020
#![feature(exclusive_range_pattern)]
21+
let x = 5;
2122
match x {
22-
..10 => println!("got it"),
23-
0 => println!("zilch")
23+
..0 => println!("negative!"), // "RangeTo" pattern. Unstable.
24+
0 => println!("zero!"),
25+
1.. => println!("positive!"), // "RangeFrom" pattern. Stable.
2426
}
2527
```

0 commit comments

Comments
 (0)