summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-10682.rs
blob: 72e4559d31a799f84d287787fec3a5dfd97fed49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass
// Regression test for issue #10682
// Nested `proc` usage can't use outer owned data

// pretty-expanded FIXME #23616

fn work(_: Box<isize>) {}
fn foo<F:FnOnce()>(_: F) {}

pub fn main() {
  let a = Box::new(1);
  foo(move|| { foo(move|| { work(a) }) })
}