Sign in
fuchsia
/
third_party
/
rust
/
daafeb35b731a599fc8b6c4cf37b81f838dae319
/
.
/
src
/
test
/
ui
/
borrowck
/
regions-escape-unboxed-closure.rs
blob: d8bef927fd722f4a853cdcb73c182cdaabeb5159 [
file
] [
log
] [
blame
]
fn
with_int
(
f
:
&
mut
dyn
FnMut
(&
isize
))
{
}
fn
main
()
{
let
mut
x
:
Option
<&
isize
>
=
None
;
with_int
(&
mut
|
y
|
x
=
Some
(
y
));
//~^ ERROR borrowed data cannot be stored outside of its closure
}