diff --git a/src/test/auxiliary/issue_2723_a.rs b/src/test/auxiliary/issue_2723_a.rs new file mode 100644 index 0000000000000..51ec1cb4b9b44 --- /dev/null +++ b/src/test/auxiliary/issue_2723_a.rs @@ -0,0 +1,3 @@ +unsafe fn f(xs: ~[int]) { + xs.map(|_x| { unsafe fn q() { fail; } }); +} \ No newline at end of file diff --git a/src/test/run-pass/issue-2723-b.rs b/src/test/run-pass/issue-2723-b.rs new file mode 100644 index 0000000000000..895a0df19e70c --- /dev/null +++ b/src/test/run-pass/issue-2723-b.rs @@ -0,0 +1,8 @@ +// aux-build:issue_2723_a.rs + +use issue_2723_a; +import issue_2723_a::*; + +fn main() unsafe { + f(~[2]); +} \ No newline at end of file