Skip to content

Commit 5950ae3

Browse files
committed
doc: Fix parse errors in list examples in documentation
1 parent f400bfd commit 5950ae3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/rust.texi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ tag list<T> @{
21332133
cons(T, @@list<T>);
21342134
@}
21352135
2136-
let a: list<int> = cons(7, cons(13, nil));
2136+
let a: list<int> = cons(7, @@cons(13, @@nil));
21372137
@end example
21382138

21392139

@@ -3360,16 +3360,16 @@ assigned to local slots in the arm's block, and control enters the block.
33603360
An example of a pattern @code{alt} expression:
33613361

33623362
@example
3363-
type list<X> = tag(nil, cons(X, @@list<X>));
3363+
tag list<X> @{ nil; cons(X, @@list<X>); @}
33643364
3365-
let x: list<int> = cons(10, cons(11, nil));
3365+
let x: list<int> = cons(10, @@cons(11, @@nil));
33663366
33673367
alt x @{
3368-
cons(a, cons(b, _)) @{
3368+
cons(a, @@cons(b, _)) @{
33693369
process_pair(a,b);
33703370
@}
3371-
cons(v=10, _) @{
3372-
process_ten(v);
3371+
cons(10, _) @{
3372+
process_ten();
33733373
@}
33743374
_ @{
33753375
fail;

0 commit comments

Comments
 (0)