blob: faa305d0e03b69c695161b53278b87f4c88f25a1 [file] [log] [blame]
// Point at the captured immutable outer variable
// Suppress unrelated warnings
#![allow(unused)]
fn foo(mut f: Box<dyn FnMut()>) {
f();
}
fn main() {
let mut y = true;
foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable
}