2012-01-18 17:42:00 -06:00
|
|
|
type pair<A,B> = {
|
|
|
|
a: A, b: B
|
|
|
|
};
|
|
|
|
|
2012-09-07 16:52:28 -05:00
|
|
|
fn f<A:Copy Owned>(a: A, b: u16) -> fn@() -> (A, u16) {
|
2012-01-18 17:42:00 -06:00
|
|
|
fn@() -> (A, u16) { (a, b) }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let (a, b) = f(22_u64, 44u16)();
|
2012-08-22 19:24:52 -05:00
|
|
|
debug!("a=%? b=%?", a, b);
|
2012-01-18 17:42:00 -06:00
|
|
|
assert a == 22u64;
|
|
|
|
assert b == 44u16;
|
|
|
|
}
|