about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-09-09 07:38:21 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-09-09 12:07:12 -0700
commit81584631226a2edf2d845fb4190e108d400d93a7 (patch)
tree855f28699ecb597a450eb9a8c8967d7e6032db04 /src/doc
parent2c66c296dba34b1f5674578d85057250576d32ff (diff)
parenteb678ff87f0cdbf523b26fe9255cff684b4091e5 (diff)
rollup merge of #17054 : pcwalton/subslice-syntax
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/rust.md2
-rw-r--r--src/doc/tutorial.md2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/rust.md b/src/doc/rust.md
index 552ff716e81..eb97a75e766 100644
--- a/src/doc/rust.md
+++ b/src/doc/rust.md
@@ -3302,7 +3302,7 @@ corresponding slice to the variable.  Example:
 fn is_symmetric(list: &[uint]) -> bool {
     match list {
         [] | [_]                   => true,
-        [x, ..inside, y] if x == y => is_symmetric(inside),
+        [x, inside.., y] if x == y => is_symmetric(inside),
         _                          => false
     }
 }
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md
index 0db25c4090e..0e5a624b273 100644
--- a/src/doc/tutorial.md
+++ b/src/doc/tutorial.md
@@ -1707,7 +1707,7 @@ let score = match numbers {
     [] => 0,
     [a] => a * 10,
     [a, b] => a * 6 + b * 4,
-    [a, b, c, ..rest] => a * 5 + b * 3 + c * 2 + rest.len() as int
+    [a, b, c, rest..] => a * 5 + b * 3 + c * 2 + rest.len() as int
 };
 ~~~~