File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2177,7 +2177,8 @@ alt x {
2177
2177
2178
2178
The first pattern matches lists constructed by applying ` cons ` to any head value, and a
2179
2179
tail value of ` @nil ` . The second pattern matches ` any ` list constructed with ` cons ` ,
2180
- ignoring the values of its arguments.
2180
+ ignoring the values of its arguments. The difference between ` _ ` and ` * ` is that the pattern ` C(_) ` is only type-correct if
2181
+ ` C ` has exactly one argument, while the pattern ` C(*) ` is type-correct for any enum variant ` C ` , regardless of how many arguments ` C ` has.
2181
2182
2182
2183
To execute an ` alt ` expression, first the head expression is evaluated, then
2183
2184
its value is sequentially compared to the patterns in the arms until a match
You can’t perform that action at this time.
0 commit comments