Skip to content

Commit eba4dad

Browse files
committed
doc: Fix broken doc test. rs=bustage
1 parent 2c2398c commit eba4dad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/rust.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,7 +2201,7 @@ then a placeholder (`_`) represents the remaining fields.
22012201
# type options = {choose: bool, size: ~str};
22022202
# type player = {player: ~str, stats: (), options: options};
22032203
# fn load_stats() { }
2204-
# fn choose_player(r: player) { }
2204+
# fn choose_player(r: &player) { }
22052205
# fn next_player() { }
22062206
22072207
fn main() {
@@ -2216,10 +2216,10 @@ fn main() {
22162216
22172217
match r {
22182218
{options: {choose: true, _}, _} => {
2219-
choose_player(r)
2219+
choose_player(&r)
22202220
}
2221-
{player: p, options: {size: ~"small", _}, _} => {
2222-
log(info, p + ~" is small");
2221+
{player: ref p, options: {size: ~"small", _}, _} => {
2222+
log(info, (copy *p) + ~" is small");
22232223
}
22242224
_ => {
22252225
next_player();

0 commit comments

Comments
 (0)