Skip to content

Commit aa656b4

Browse files
authored
Merge pull request rust-lang#234 from equal-l2/patch-1
Clarify which types range patterns work on
2 parents 64863a6 + 4de1412 commit aa656b4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/expressions/match-expr.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ let message = match x {
117117
};
118118
```
119119

120-
Range patterns only work on scalar types (like integers and characters; not
121-
like arrays and structs, which have sub-components). A range pattern may not be
120+
Range patterns only work on `char` and numeric types. A range pattern may not be
122121
a sub-range of another range pattern inside the same `match`.
123122

124123
Finally, match patterns can accept *pattern guards* to further refine the

0 commit comments

Comments
 (0)