Sign in
rust
/
rust-lang
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
closures
/
issue-10682.rs
blob: 265e72aaa690fa76d4f542db8f02ba18eb907ca9 [
file
] [
log
] [
blame
]
//@ run-pass
// Regression test for issue #10682
// Nested `proc` usage can't use outer owned data
fn
work
(
_
:
Box
<
isize
>)
{}
fn
foo
<
F
:
FnOnce
()>(
_
:
F
)
{}
pub
fn
main
()
{
let
a
=
Box
::
new
(
1
);
foo
(
move
||
{
foo
(
move
||
{
work
(
a
)
})
})
}