1 // Regression test for #87456.
3 fn take_mut(_val: impl FnMut()) {}
6 let val = String::new();
7 //~^ NOTE: captured outer variable
9 //~^ NOTE: captured by this `FnMut` closure
10 let _foo: String = val;
11 //~^ ERROR: cannot move out of `val`, a captured variable in an `FnMut` closure [E0507]
12 //~| NOTE: move occurs because