Skip to content

Commit de7d887

Browse files
committed
Revise wording on constraint-nonempty
Let's revise the wording to avoid a possible ambiguity about what we're matching against.
1 parent cf93686 commit de7d887

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ It is written as `..=` followed by the upper bound.
555555
For example, `..=10` will match any integer less than or equal to 10, such as 10, 1, 0, and for signed integer types, all negative values.
556556

557557
r[patterns.range.constraint-nonempty]
558-
A range pattern must match at least one possible value. In other words:
558+
A range pattern must be nonempty; it must span at least one value in the set of possible values for its type. In other words:
559559

560560
* In `a..=b`, a ≤ b must be the case. For example, it is an error to have a range pattern `10..=0`, but `10..=10` is allowed.
561561
* In `a..b`, a < b must be the case. For example, it is an error to have a range pattern `10..0` or `10..10`.

0 commit comments

Comments
 (0)