diff options
| author | Brian Anderson <[email protected]> | 2011-02-24 18:39:57 -0500 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-03-01 23:11:52 -0500 |
| commit | e2d36e00ce2b58272b52a5c1f999b0bcb61d066b (patch) | |
| tree | c128fc07bfeebb36116fe65286eea036cefd8720 | |
| parent | Remove reference to deceased rustboot LLVM backend (diff) | |
| download | rust-e2d36e00ce2b58272b52a5c1f999b0bcb61d066b.tar.xz rust-e2d36e00ce2b58272b52a5c1f999b0bcb61d066b.zip | |
Remove parens from nullary tag constructors in docs
| -rw-r--r-- | doc/rust.texi | 16 |
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, _))) @{ |