Sign in
fuchsia
/
third_party
/
rust
/
20d43d03dd27568f609d621ce44673393e838892
/
.
/
src
/
test
/
ui
/
borrowck
/
regions-escape-bound-fn-2.rs
blob: cb423032b46106736774935175811a175e6455b9 [
file
] [
log
] [
blame
]
fn
with_int
<
F
>(
f
:
F
)
where F
:
FnOnce
(&
isize
)
{
let
x
=
3
;
f
(&
x
);
}
fn
main
()
{
let
mut
x
=
None
;
with_int
(|
y
|
x
=
Some
(
y
));
//~^ ERROR borrowed data cannot be stored outside of its closure
}