Skip to content

Commit a132848

Browse files
committed
---
yaml --- r: 6032 b: refs/heads/master c: ba1df0e h: refs/heads/master v: v3
1 parent d069b44 commit a132848

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: fd095fbfa60f3f0c66dd8c975924687db54c3ec5
2+
refs/heads/master: ba1df0eda9b0b36ef2f7b2dd69535621ca35ffb2

trunk/doc/rust.texi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3402,6 +3402,17 @@ alt x @{
34023402
@}
34033403
@end example
34043404

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+
34053416

34063417
@node Ref.Expr.Alt.Type
34073418
@subsubsection Ref.Expr.Alt.Type

0 commit comments

Comments
 (0)