/src/test/run-pass/auto-instantiate.rs
http://github.com/jruderman/rust · Rust · 10 lines · 5 code · 4 blank · 1 comment · 0 complexity · 8abee07560586662e776347f280fed8c MD5 · raw file
- // -*- 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);
- }