diff --git a/src/test/run-fail/issue-2272.rs b/src/test/run-fail/issue-2272.rs index 88af2c70d77b..c81ef07f5d79 100644 --- a/src/test/run-fail/issue-2272.rs +++ b/src/test/run-fail/issue-2272.rs @@ -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 diff --git a/src/test/run-fail/issue-948.rs b/src/test/run-fail/issue-948.rs index 82fc5e498236..7a41eb0ca50d 100644 --- a/src/test/run-fail/issue-948.rs +++ b/src/test/run-fail/issue-948.rs @@ -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}; } diff --git a/src/test/run-fail/rhs-type.rs b/src/test/run-fail/rhs-type.rs index 49274c90aec8..54a3e9d5a97d 100644 --- a/src/test/run-fail/rhs-type.rs +++ b/src/test/run-fail/rhs-type.rs @@ -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}; } diff --git a/src/test/run-fail/unwind-rec.rs b/src/test/run-fail/unwind-rec.rs index cbb2fd7e5ef3..200d511db541 100644 --- a/src/test/run-fail/unwind-rec.rs +++ b/src/test/run-fail/unwind-rec.rs @@ -14,8 +14,10 @@ fn build() -> ~[int] { fail; } +struct Blk { node: ~[int] } + fn main() { - let blk = { + let blk = Blk { node: build() }; } \ No newline at end of file diff --git a/src/test/run-fail/unwind-rec2.rs b/src/test/run-fail/unwind-rec2.rs index 993566d32d9e..bf35abdafaf2 100644 --- a/src/test/run-fail/unwind-rec2.rs +++ b/src/test/run-fail/unwind-rec2.rs @@ -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() };