]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/closure-immutable-outer-variable.rs.fixed
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / closures / closure-immutable-outer-variable.rs.fixed
1 // Point at the captured immutable outer variable
2
3 fn foo(mut f: Box<FnMut()>) {
4     f();
5 }
6
7 fn main() {
8     let mut y = true;
9     foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable
10 }