mirror of https://github.com/rust-lang/rust.git
parent
27fe23dcaa
commit
ab86642e35
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue