rust/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs
2023-01-11 09:32:08 +00:00

20 lines
277 B
Rust

// edition:2021
// run-pass
fn solve<F>(validate: F) -> Option<u64>
where
F: Fn(&mut [i8; 1]),
{
let mut position: [i8; 1] = [1];
Some(0).map(|_| {
validate(&mut position);
let [_x] = position;
0
})
}
fn main() {
solve(|_| ());
}