PageRenderTime 11ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1
 2
 3
 4// -*- rust -*-
 5fn f<T: copy, U: copy>(x: T, y: U) -> {a: T, b: U} { return {a: x, b: y}; }
 6
 7fn main() {
 8    log(debug, f({x: 3, y: 4, z: 5}, 4).a.x);
 9    log(debug, f(5, 6).a);
10}