fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
228 B10 linesraw
1// Point at the captured immutable outer variable
2
3fn foo(mut f: Box<FnMut()>) {
4    f();
5}
6
7fn main() {
8    let mut y = true;
9    foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable
10}