Skip to content

Commit 92af552

Browse files
committed
Add an unwind test for failure during unique box construction
1 parent 2cc01e2 commit 92af552

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// error-pattern:fail
2+
3+
fn f() -> [int] { fail; }
4+
5+
// Voodoo. In unwind-alt we had to do this to trigger the bug. Might
6+
// have been to do with memory allocation patterns.
7+
fn prime() {
8+
@0;
9+
}
10+
11+
fn partial() {
12+
let x = ~f();
13+
}
14+
15+
fn main() {
16+
prime();
17+
partial();
18+
}

0 commit comments

Comments
 (0)