Skip to content

Commit 5c2a580

Browse files
pcwaltonManishearth
authored andcommitted
librustc: Forbid .. in range patterns.
This breaks code that looks like: match foo { 1..3 => { ... } } Instead, write: match foo { 1...3 => { ... } } Closes rust-lang#17295. [breaking-change]
1 parent 93be85f commit 5c2a580

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3410,7 +3410,7 @@ may be specified with `..`. For example:
34103410
34113411
let message = match x {
34123412
0 | 1 => "not many",
3413-
2 .. 9 => "a few",
3413+
2 ... 9 => "a few",
34143414
_ => "lots"
34153415
};
34163416
```

0 commit comments

Comments
 (0)