Skip to content

Commit

Permalink
Merge pull request rust-lang#234 from equal-l2/patch-1
Browse files Browse the repository at this point in the history
Clarify which types range patterns work on
  • Loading branch information
Havvy authored Feb 7, 2018
2 parents 64863a6 + 4de1412 commit aa656b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/expressions/match-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ let message = match x {
};
```

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

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

0 comments on commit aa656b4

Please sign in to comment.