Skip to content

Commit 2473c79

Browse files
committed
---
yaml --- r: 60767 b: refs/heads/auto c: 7ee329e h: refs/heads/master i: 60765: 8d9d3f3 60763: 0f9e141 60759: 014943e 60751: 49cff55 60735: f4c47dd v: v3
1 parent 3df6626 commit 2473c79

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
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: fe7f528e5d537adab4c9c87dbbabbd0382869516
17+
refs/heads/auto: 7ee329e97a24d259f76c1a6e910f32aa11e07862
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
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)