mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
testsuite: Eliminate structural records from run-fail tests
This commit is contained in:
parent
72b669df43
commit
bb183b93ea
@ -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
|
||||
|
@ -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};
|
||||
}
|
||||
|
@ -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}; }
|
||||
|
@ -14,8 +14,10 @@ fn build() -> ~[int] {
|
||||
fail;
|
||||
}
|
||||
|
||||
struct Blk { node: ~[int] }
|
||||
|
||||
fn main() {
|
||||
let blk = {
|
||||
let blk = Blk {
|
||||
node: build()
|
||||
};
|
||||
}
|
@ -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()
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user