/src/test/run-pass/send-type-inference.rs
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() { }