rust/tests/ui/cross-crate/auxiliary/cci_iter_lib.rs
2023-01-11 09:32:08 +00:00

12 lines
199 B
Rust

#![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;
}
}