2010-08-26 14:45:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-15 11:19:50 -07:00
|
|
|
// -*- rust -*-
|
2012-01-05 15:35:37 +01:00
|
|
|
fn f<T: copy, U: copy>(x: T, y: U) -> {a: T, b: U} { ret {a: x, b: y}; }
|
2011-06-15 11:19:50 -07:00
|
|
|
|
2011-12-22 14:42:52 -08:00
|
|
|
fn main() {
|
2011-12-22 17:53:53 -08:00
|
|
|
log(debug, f({x: 3, y: 4, z: 5}, 4).a.x);
|
|
|
|
log(debug, f(5, 6).a);
|
2011-12-22 14:42:52 -08:00
|
|
|
}
|