mirror of https://github.com/rust-lang/reference
librustc: Forbid `..` in range patterns.
This breaks code that looks like: match foo { 1..3 => { ... } } Instead, write: match foo { 1...3 => { ... } } Closes #17295. [breaking-change]
This commit is contained in:
parent
93be85f7d9
commit
5c2a580183
|
@ -3410,7 +3410,7 @@ may be specified with `..`. For example:
|
|||
|
||||
let message = match x {
|
||||
0 | 1 => "not many",
|
||||
2 .. 9 => "a few",
|
||||
2 ... 9 => "a few",
|
||||
_ => "lots"
|
||||
};
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue