summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-10682.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-10682.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-10682.rs b/src/test/ui/issues/issue-10682.rs
new file mode 100644
index 000000000..afaa90f05
--- /dev/null
+++ b/src/test/ui/issues/issue-10682.rs
@@ -0,0 +1,15 @@
+// run-pass
+// Regression test for issue #10682
+// Nested `proc` usage can't use outer owned data
+
+// pretty-expanded FIXME #23616
+
+#![feature(box_syntax)]
+
+fn work(_: Box<isize>) {}
+fn foo<F:FnOnce()>(_: F) {}
+
+pub fn main() {
+ let a = box 1;
+ foo(move|| { foo(move|| { work(a) }) })
+}