rustdoc: Don't use by copy in fst/snd to work around segv

Issue #1546
This commit is contained in:
Brian Anderson 2012-01-16 21:56:18 -08:00
parent 27fe23dcaa
commit ab86642e35
1 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
// FIXME #1546: Would rather write fst<T, U>(+pair: (T, U)) -> T
fn fst<T, U>(+pair: (T, U)) -> T { fn fst<T:copy, U:copy>(pair: (T, U)) -> T {
let (t, _) = pair; let (t, _) = pair;
ret t; ret t;
} }
fn snd<T, U>(+pair: (T, U)) -> U { fn snd<T:copy, U:copy>(pair: (T, U)) -> U {
let (_, u) = pair; let (_, u) = pair;
ret u; ret u;
} }