summaryrefslogtreecommitdiffstats
path: root/tests/ui/cross-crate/auxiliary/cci_iter_lib.rs
blob: 60c36bc7d05ae26b6adc3e0b2afc27b4c7ef3c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
#![crate_name="cci_iter_lib"]

#[inline]
pub fn iter<T, F>(v: &[T], mut f: F) where F: FnMut(&T) {
    let mut i = 0;
    let n = v.len();
    while i < n {
        f(&v[i]);
        i += 1;
    }
}