testsuite: Eliminate structural records from run-fail tests

This commit is contained in:
Tim Chevalier 2013-01-26 00:25:41 -08:00
parent 72b669df43
commit bb183b93ea
5 changed files with 21 additions and 7 deletions

View File

@ -11,9 +11,13 @@
// error-pattern:explicit failure
// Issue #2272 - unwind this without leaking the unique pointer
struct X { y: Y, a: ~int }
struct Y { z: @int }
fn main() {
let _x = {
y: {
let _x = X {
y: Y {
z: @0
},
a: ~0

View File

@ -9,7 +9,10 @@
// except according to those terms.
// error-pattern:beep boop
struct Point { x: int, y: int }
fn main() {
let origin = {x: 0, y: 0};
let f: {x:int,y:int} = {x: (fail ~"beep boop"),.. origin};
let origin = Point {x: 0, y: 0};
let f: Point = Point {x: (fail ~"beep boop"),.. origin};
}

View File

@ -11,4 +11,7 @@
// Tests that trans treats the rhs of pth's decl
// as a _|_-typed thing, not a str-typed thing
// error-pattern:bye
fn main() { let pth = fail ~"bye"; let rs: {t: ~str} = {t: pth}; }
struct T { t: ~str }
fn main() { let pth = fail ~"bye"; let rs: T = T {t: pth}; }

View File

@ -14,8 +14,10 @@ fn build() -> ~[int] {
fail;
}
struct Blk { node: ~[int] }
fn main() {
let blk = {
let blk = Blk {
node: build()
};
}

View File

@ -18,8 +18,10 @@ fn build2() -> ~[int] {
fail;
}
struct Blk { node: ~[int], span: ~[int] }
fn main() {
let blk = {
let blk = Blk {
node: build1(),
span: build2()
};