rust/src/test/run-pass/auto-instantiate.rs

11 lines
183 B
Rust
Raw Normal View History

// -*- rust -*-
2012-08-01 19:30:05 -05:00
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);
}