2229: Handle update to capture kind properly
This commit is contained in:
parent
ef52471066
commit
fbd775ff29
2 changed files with 24 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
// 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(|_| ());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue