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 fd095fb commit ba1df0eCopy full SHA for ba1df0e
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