From f400bfd8fdce370a8ee29ee250ebb48a1c005ad6 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Mon, 17 Oct 2011 22:33:09 -0700 Subject: [PATCH] doc: Update 'alt' documentation to remove 'case' keyword --- doc/rust.texi | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/rust.texi b/doc/rust.texi index 5024dd47ed3..076aecb36e0 100644 --- a/doc/rust.texi +++ b/doc/rust.texi @@ -3353,10 +3353,9 @@ equal the type of the head expression. To execute a pattern @code{alt} expression, first the head expression is evaluated, then its value is sequentially compared to the patterns in the arms -until a match is found. The first arm with a matching @code{case} pattern is -chosen as the branch target of the @code{alt}, any variables bound by the -pattern are assigned to local slots in the arm's block, and control enters the -block. +until a match is found. The first arm with a matching pattern is chosen as the +branch target of the @code{alt}, any variables bound by the pattern are +assigned to local slots in the arm's block, and control enters the block. An example of a pattern @code{alt} expression: @@ -3366,13 +3365,13 @@ type list = tag(nil, cons(X, @@list)); let x: list = cons(10, cons(11, nil)); alt x @{ - case (cons(a, cons(b, _))) @{ + cons(a, cons(b, _)) @{ process_pair(a,b); @} - case (cons(v=10, _)) @{ + cons(v=10, _) @{ process_ten(v); @} - case (_) @{ + _ @{ fail; @} @}