Skip to content

Commit a6e5bad

Browse files
committed
---
yaml --- r: 62772 b: refs/heads/snap-stage3 c: 7ee329e h: refs/heads/master v: v3
1 parent a035b48 commit a6e5bad

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: fe7f528e5d537adab4c9c87dbbabbd0382869516
4+
refs/heads/snap-stage3: 7ee329e97a24d259f76c1a6e910f32aa11e07862
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//xfail-test
2+
3+
// Creating a stack closure which references an owned pointer and then
4+
// transferring ownership of the owned box before invoking the stack
5+
// closure results in a crash.
6+
7+
fn twice(x: ~uint) -> uint
8+
{
9+
*x * 2
10+
}
11+
12+
fn invoke(f : &fn() -> uint)
13+
{
14+
f();
15+
}
16+
17+
fn main()
18+
{
19+
let x : ~uint = ~9;
20+
let sq : &fn() -> uint = || { *x * *x };
21+
22+
twice(x);
23+
invoke(sq);
24+
}

0 commit comments

Comments
 (0)