aboutsummaryrefslogtreecommitdiff
path: root/doc/rust.texi
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-02-24 18:39:57 -0500
committerBrian Anderson <[email protected]>2011-03-01 23:11:52 -0500
commite2d36e00ce2b58272b52a5c1f999b0bcb61d066b (patch)
treec128fc07bfeebb36116fe65286eea036cefd8720 /doc/rust.texi
parentRemove reference to deceased rustboot LLVM backend (diff)
downloadrust-e2d36e00ce2b58272b52a5c1f999b0bcb61d066b.tar.xz
rust-e2d36e00ce2b58272b52a5c1f999b0bcb61d066b.zip
Remove parens from nullary tag constructors in docs
Diffstat (limited to 'doc/rust.texi')
-rw-r--r--doc/rust.texi16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/rust.texi b/doc/rust.texi
index 740d45c6..48a639dd 100644
--- a/doc/rust.texi
+++ b/doc/rust.texi
@@ -1990,22 +1990,22 @@ module system).
An example of a @code{tag} item and its use:
@example
tag animal @{
- dog();
- cat();
+ dog;
+ cat;
@}
-let animal a = dog();
-a = cat();
+let animal a = dog;
+a = cat;
@end example
An example of a @emph{recursive} @code{tag} item and its use:
@example
tag list[T] @{
- nil();
+ 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
@@ -3401,9 +3401,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, _))) @{