PageRenderTime 12ms CodeModel.GetById 2ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/run-pass/type-params-in-for-each.rs

http://github.com/jruderman/rust
Rust | 12 lines | 8 code | 4 blank | 0 comment | 1 complexity | a1ec560f7503f8a6c978a7194212326a MD5 | raw file
 1
 2
 3fn range(lo: uint, hi: uint, it: fn(uint)) {
 4    let mut lo_ = lo;
 5    while lo_ < hi { it(lo_); lo_ += 1u; }
 6}
 7
 8fn create_index<T>(index: ~[{a: T, b: uint}], hash_fn: extern fn(T) -> uint) {
 9    range(0u, 256u, |_i| { let bucket: ~[T] = ~[]; } )
10}
11
12fn main() { }