2012-01-18 15:42:00 -08:00
|
|
|
type pair<A,B> = {
|
|
|
|
a: A, b: B
|
|
|
|
};
|
|
|
|
|
2012-07-16 20:17:57 -07:00
|
|
|
fn f<A:copy owned>(a: A, b: u16) -> fn@() -> (A, u16) {
|
2012-01-18 15:42:00 -08:00
|
|
|
fn@() -> (A, u16) { (a, b) }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let (a, b) = f(22_u64, 44u16)();
|
2012-07-30 16:01:07 -07:00
|
|
|
debug!{"a=%? b=%?", a, b};
|
2012-01-18 15:42:00 -08:00
|
|
|
assert a == 22u64;
|
|
|
|
assert b == 44u16;
|
|
|
|
}
|