From bada191309d43d481d265bb1ff9c3a14e827babf Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sun, 16 Jun 2013 12:48:08 -0400 Subject: [PATCH] Correct docs --- doc/rust.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(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; }