aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2010-07-17 06:50:18 +0800
committerGraydon Hoare <[email protected]>2010-07-18 14:25:50 +0800
commit0633c7ae6e54edebde8421cef14267ad1ba1e30c (patch)
tree20d1e17916335b970e61015129b4e5c7febba2f1 /doc
parentStub an interface to the (as-yet-nonexistent) structural comparison glue in t... (diff)
downloadrust-0633c7ae6e54edebde8421cef14267ad1ba1e30c.tar.xz
rust-0633c7ae6e54edebde8421cef14267ad1ba1e30c.zip
Fix syntax of tag variants in the list example
Diffstat (limited to 'doc')
-rw-r--r--doc/rust.texi8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/rust.texi b/doc/rust.texi
index 1f780d6f..3ad445d2 100644
--- a/doc/rust.texi
+++ b/doc/rust.texi
@@ -2193,9 +2193,9 @@ a = cat;
An example of a @emph{recursive} @code{tag} type and its use:
@example
-type list[T] = tag(nil,
+type list[T] = tag(nil(),
cons(T, @@list[T]));
-let list[int] a = cons(7, cons(13, nil));
+let list[int] a = cons(7, cons(13, nil()));
@end example
@@ -3315,9 +3315,9 @@ control enters the block.
An example of a pattern @code{alt} statement:
@example
-type list[X] = tag(nil, cons(X, @@list[X]));
+type list[X] = tag(nil(), cons(X, @@list[X]));
-let list[int] x = cons(10, cons(11, nil));
+let list[int] x = cons(10, cons(11, nil()));
alt (x) @{
case (cons(a, cons(b, _))) @{