Add an unwind test for failure during unique box construction
This commit is contained in:
parent
2cc01e2ca2
commit
92af552956
1 changed files with 18 additions and 0 deletions
18
src/test/run-fail/unwind-partial-unique.rs
Normal file
18
src/test/run-fail/unwind-partial-unique.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// error-pattern:fail
|
||||
|
||||
fn f() -> [int] { fail; }
|
||||
|
||||
// Voodoo. In unwind-alt we had to do this to trigger the bug. Might
|
||||
// have been to do with memory allocation patterns.
|
||||
fn prime() {
|
||||
@0;
|
||||
}
|
||||
|
||||
fn partial() {
|
||||
let x = ~f();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
prime();
|
||||
partial();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue