Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c9c4d92

Browse files
committedMay 27, 2013
Add xfail'd test for #6762.
1 parent 3941f78 commit c9c4d92

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
 

‎src/test/compile-fail/issue-6762.rs

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+
}

5 commit comments

Comments
 (5)

bors commented on May 28, 2013

@bors
Collaborator

saw approval from catamorphism
at lkuper@c9c4d92

bors commented on May 28, 2013

@bors
Collaborator

merging lkuper/rust/6762 = c9c4d92 into auto

bors commented on May 28, 2013

@bors
Collaborator

lkuper/rust/6762 = c9c4d92 merged ok, testing candidate = 7ee329e

bors commented on May 28, 2013

@bors
Collaborator

fast-forwarding incoming to auto = 7ee329e

Please sign in to comment.