about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2013-06-16 12:48:08 -0400
committerNiko Matsakis <niko@alum.mit.edu>2013-06-16 12:48:08 -0400
commitbada191309d43d481d265bb1ff9c3a14e827babf (patch)
treeace0efae202d0ff19a99dbe188c6fbb875785b83
parent5fdb0cbb8ce98bdddc947fc1eeabd2efd509aadc (diff)
downloadrust-bada191309d43d481d265bb1ff9c3a14e827babf.tar.gz
rust-bada191309d43d481d265bb1ff9c3a14e827babf.zip
Correct docs
-rw-r--r--doc/rust.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/rust.md b/doc/rust.md
index 3c0828def15..9edbc44d6c2 100644
--- a/doc/rust.md
+++ b/doc/rust.md
@@ -2826,7 +2826,7 @@ Within the body of an item that has type parameter declarations, the names of it
 ~~~~~~~
 fn map<A: Copy, B: Copy>(f: &fn(A) -> B, xs: &[A]) -> ~[B] {
    if xs.len() == 0 { return ~[]; }
-   let first: B = f(xs[0]);
+   let first: B = f(copy xs[0]);
    let rest: ~[B] = map(f, xs.slice(1, xs.len()));
    return ~[first] + rest;
 }