Skip to content

Commit 88be5c3

Browse files
committed
---
yaml --- r: 37606 b: refs/heads/try c: 624fbbd h: refs/heads/master v: v3
1 parent 43df78e commit 88be5c3

File tree

6 files changed

+38
-34
lines changed

6 files changed

+38
-34
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: 12a41307490c3d3188086b5964332df50b3c3a9d
5+
refs/heads/try: 624fbbd3d117f7199d69c923c051a6d46a4b88b7
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
// xfail-test
21
// Fail statements without arguments need to be disambiguated in
32
// certain positions
4-
// error-pattern:explicit-failure
3+
// error-pattern:oops
54

65
fn bigfail() {
7-
do { while (fail) { if (fail) {
8-
match (fail) { _ {
9-
}}
10-
}}} while fail;
6+
while (fail ~"oops") { if (fail) {
7+
match (fail) { () => {
8+
}
9+
}
10+
}};
1111
}
1212

1313
fn main() { bigfail(); }
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
// error-pattern:ran out of stack
2-
// xfail-test - right now we leak when we fail during failure
32

43
// Test that the task fails after hiting the recursion limit
5-
// durnig unwinding
4+
// during unwinding
65

76
fn recurse() {
87
log(debug, "don't optimize me out");
98
recurse();
109
}
1110

12-
class r {
13-
let recursed: *mut bool;
14-
new(recursed: *mut bool) unsafe { self.recursed = recursed; }
15-
drop unsafe {
16-
if !*recursed {
17-
*recursed = true;
18-
recurse();
11+
struct r {
12+
recursed: *mut bool,
13+
drop unsafe {
14+
if !*(self.recursed) {
15+
*(self.recursed) = true;
16+
recurse();
17+
}
1918
}
20-
}
19+
}
20+
21+
fn r(recursed: *mut bool) -> r unsafe {
22+
r { recursed: recursed }
2123
}
2224

2325
fn main() {
2426
let mut recursed = false;
25-
let _r = r(ptr::mut_addr_of(recursed));
27+
let _r = r(ptr::mut_addr_of(&recursed));
2628
recurse();
2729
}

branches/try/src/test/run-fail/unwind-resource-fail.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// error-pattern:fail
2-
// xfail-test
1+
// error-pattern:squirrel
32

4-
class r {
5-
new(i:int) {}
6-
drop { fail; }
3+
struct r {
4+
i: int,
5+
drop { fail ~"squirrel" }
76
}
87

8+
fn r(i: int) -> r { r { i: i } }
9+
910
fn main() {
1011
@0;
1112
let r = move r(0);

branches/try/src/test/run-fail/unwind-resource-fail2.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// error-pattern:fail
2-
// xfail-test
1+
// error-pattern:wombat
32

4-
class r {
5-
new(i:int) {}
6-
drop { fail; }
3+
struct r {
4+
i: int,
5+
drop { fail ~"wombat" }
76
}
87

8+
fn r(i: int) -> r { r { i: i } }
9+
910
fn main() {
1011
@0;
1112
let r = move r(0);

branches/try/src/test/run-fail/unwind-resource-fail3.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// error-pattern:quux
2-
// xfail-test
32

4-
class faily_box {
5-
let i: @int;
6-
new(i: @int) { self.i = i; }
7-
// What happens to the box pointer owned by this class?
3+
struct faily_box {
4+
i: @int
85
}
6+
// What happens to the box pointer owned by this class?
7+
8+
fn faily_box(i: @int) -> faily_box { faily_box { i: i } }
99

1010
impl faily_box : Drop {
1111
fn finalize() {
12-
fail "quux";
12+
fail ~"quux";
1313
}
1414
}
1515

0 commit comments

Comments
 (0)