Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
unboxed-closures
/
unboxed-closure-region.rs
blob: f202492eda553ad4b5ec5eefe8aecf61914d8dfd [
file
] [
log
] [
blame
]
// Test that an unboxed closure that captures a free variable by
// reference cannot escape the region of that variable.
fn
main
()
{
let
_f
=
{
let
x
=
0
;
||
x
//~ ERROR `x` does not live long enough
};
_f
;
}