Skip to content

Commit 2c5b04c

Browse files
committed
Replace '*' by '..' in the doc of pattern matching
1 parent 2b62371 commit 2c5b04c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2865,7 +2865,7 @@ match_pat : pat [ ".." pat ] ? [ "if" expr ] ;
28652865
A `match` expression branches on a *pattern*. The exact form of matching that
28662866
occurs depends on the pattern. Patterns consist of some combination of
28672867
literals, destructured enum constructors, structures, records and tuples, variable binding
2868-
specifications, wildcards (`*`), and placeholders (`_`). A `match` expression has a *head
2868+
specifications, wildcards (`..`), and placeholders (`_`). A `match` expression has a *head
28692869
expression*, which is the value to compare to the patterns. The type of the
28702870
patterns must equal the type of the head expression.
28712871

@@ -2887,7 +2887,7 @@ match x {
28872887

28882888
The first pattern matches lists constructed by applying `Cons` to any head value, and a
28892889
tail value of `~Nil`. The second pattern matches _any_ list constructed with `Cons`,
2890-
ignoring the values of its arguments. The difference between `_` and `*` is that the pattern
2890+
ignoring the values of its arguments. The difference between `_` and `..` is that the pattern
28912891
`C(_)` is only type-correct if `C` has exactly one argument, while the pattern `C(..)` is
28922892
type-correct for any enum variant `C`, regardless of how many arguments `C` has.
28932893

0 commit comments

Comments
 (0)