Skip to content

Commit bb183b9

Browse files
committed
testsuite: Eliminate structural records from run-fail tests
1 parent 72b669d commit bb183b9

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

src/test/run-fail/issue-2272.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@
1111
// error-pattern:explicit failure
1212
// Issue #2272 - unwind this without leaking the unique pointer
1313

14+
struct X { y: Y, a: ~int }
15+
16+
struct Y { z: @int }
17+
1418
fn main() {
15-
let _x = {
16-
y: {
19+
let _x = X {
20+
y: Y {
1721
z: @0
1822
},
1923
a: ~0

src/test/run-fail/issue-948.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
// except according to those terms.
1010

1111
// error-pattern:beep boop
12+
13+
struct Point { x: int, y: int }
14+
1215
fn main() {
13-
let origin = {x: 0, y: 0};
14-
let f: {x:int,y:int} = {x: (fail ~"beep boop"),.. origin};
16+
let origin = Point {x: 0, y: 0};
17+
let f: Point = Point {x: (fail ~"beep boop"),.. origin};
1518
}

src/test/run-fail/rhs-type.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@
1111
// Tests that trans treats the rhs of pth's decl
1212
// as a _|_-typed thing, not a str-typed thing
1313
// error-pattern:bye
14-
fn main() { let pth = fail ~"bye"; let rs: {t: ~str} = {t: pth}; }
14+
15+
struct T { t: ~str }
16+
17+
fn main() { let pth = fail ~"bye"; let rs: T = T {t: pth}; }

src/test/run-fail/unwind-rec.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ fn build() -> ~[int] {
1414
fail;
1515
}
1616

17+
struct Blk { node: ~[int] }
18+
1719
fn main() {
18-
let blk = {
20+
let blk = Blk {
1921
node: build()
2022
};
2123
}

src/test/run-fail/unwind-rec2.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ fn build2() -> ~[int] {
1818
fail;
1919
}
2020

21+
struct Blk { node: ~[int], span: ~[int] }
22+
2123
fn main() {
22-
let blk = {
24+
let blk = Blk {
2325
node: build1(),
2426
span: build2()
2527
};

0 commit comments

Comments
 (0)