From eba4dadc54b9f6157a2efd386ae2705595fda43d Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Sat, 8 Dec 2012 11:47:03 -0800 Subject: [PATCH] doc: Fix broken doc test. rs=bustage --- doc/rust.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/rust.md b/doc/rust.md index 096b873e589..7a88086e0dd 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -2201,7 +2201,7 @@ then a placeholder (`_`) represents the remaining fields. # type options = {choose: bool, size: ~str}; # type player = {player: ~str, stats: (), options: options}; # fn load_stats() { } -# fn choose_player(r: player) { } +# fn choose_player(r: &player) { } # fn next_player() { } fn main() { @@ -2216,10 +2216,10 @@ fn main() { match r { {options: {choose: true, _}, _} => { - choose_player(r) + choose_player(&r) } - {player: p, options: {size: ~"small", _}, _} => { - log(info, p + ~" is small"); + {player: ref p, options: {size: ~"small", _}, _} => { + log(info, (copy *p) + ~" is small"); } _ => { next_player();