We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d069b44 commit a132848Copy full SHA for a132848
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: fd095fbfa60f3f0c66dd8c975924687db54c3ec5
+refs/heads/master: ba1df0eda9b0b36ef2f7b2dd69535621ca35ffb2
trunk/doc/rust.texi
@@ -3402,6 +3402,17 @@ alt x @{
3402
@}
3403
@end example
3404
3405
+Multiple alternative patterns may be joined with the @code{|} operator. A
3406
+range of values may be specified with @code{to}. For example:
3407
+
3408
+@example
3409
+let message = alt x @{
3410
+ 0 | 1 @{ "not many" @}
3411
+ 2 to 9 @{ "a few" @}
3412
+ _ @{ "lots" @}
3413
+@}
3414
+@end example
3415
3416
3417
@node Ref.Expr.Alt.Type
3418
@subsubsection Ref.Expr.Alt.Type
0 commit comments