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

7 lines
145 B
Rust
Raw Normal View History

// -*- rust -*-
2011-07-27 14:19:39 +02:00
fn f[T, U](x: &T, y: &U) -> {a: T, b: U} { ret {a: x, b: y}; }
2011-07-27 14:19:39 +02:00
fn main() { log f({x: 3, y: 4, z: 5}, 4).a.x; log f(5, 6).a; }