Skip to content

Commit 4de1412

Browse files
authored
Clarify which types range patterns work on
1 parent 55893bf commit 4de1412

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)