]> git.lizzy.rs Git - rust.git/blob - src/test/rustfix/closure-immutable-outer-variable.rs
Auto merge of #57035 - Zoxc:query-pref9, r=michaelwoerister
[rust.git] / src / test / rustfix / closure-immutable-outer-variable.rs
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 y = true;
9     foo(Box::new(move || y = false) as Box<_>);
10 }