summary refs log tree commit diff
path: root/src/test/auxiliary/cci_impl_lib.rs
blob: 1f0f2574ba3bb42c1e2b2eff30bb8d0bcebb2a1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[link(name="cci_impl_lib", vers="0.0")];

trait uint_helpers {
    fn to(v: uint, f: fn(uint));
}

impl uint: uint_helpers {
    #[inline]
    fn to(v: uint, f: fn(uint)) {
        let mut i = self;
        while i < v {
            f(i);
            i += 1u;
        }
    }
}