Sign in
rust
/
rust
/
8eb7c58dbb7b32701af113bc58722d0d1fefb1eb
/
.
/
src
/
test
/
rustfix
/
closure-immutable-outer-variable.fixed
blob: 05bbc13d714fac81c2f05c131a0a0dd1d7b0cb75 [
file
]
// Point at the captured immutable outer variable
fn foo
(
mut f
:
Box
<
FnMut
()>)
{
f
();
}
fn main
()
{
let
mut y
=
true
;
foo
(
Box
::
new
(
move
||
y
=
false
)
as
Box
<
_
>);
}