PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/run-pass/send-type-inference.rs

http://github.com/jruderman/rust
Rust | 13 lines | 10 code | 2 blank | 1 comment | 0 complexity | 3ef4dfce3ee1da3eb4b3118d998a4471 MD5 | raw file
 1use std;
 2import comm::chan;
 3import comm::send;
 4import comm::port;
 5
 6// tests that ctrl's type gets inferred properly
 7type command<K: send, V: send> = {key: K, val: V};
 8
 9fn cache_server<K: send, V: send>(c: chan<chan<command<K, V>>>) {
10    let ctrl = port();
11    send(c, chan(ctrl));
12}
13fn main() { }