rust/src/test/run-pass/auto-instantiate.rs
2012-08-01 19:16:06 -07:00

11 lines
183 B
Rust

// -*- rust -*-
fn f<T: copy, U: copy>(x: T, y: U) -> {a: T, b: U} { return {a: x, b: y}; }
fn main() {
log(debug, f({x: 3, y: 4, z: 5}, 4).a.x);
log(debug, f(5, 6).a);
}