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

13 lines
262 B
Rust

#![crate_name="cci_no_inline_lib"]
// same as cci_iter_lib, more-or-less, but not marked inline
pub fn iter<F>(v: Vec<usize> , mut f: F) where F: FnMut(usize) {
let mut i = 0;
let n = v.len();
while i < n {
f(v[i]);
i += 1;
}
}