about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-01-26 00:25:41 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-01-26 11:38:00 -0800
commitbb183b93ea2aacc9563aee782c9a239cf57da24f (patch)
treeda5f0ed56f1a295b0f7e0f809dfcc92219761790 /src
parent72b669df431a24071dff69e5d3a52ef5ee965cb1 (diff)
downloadrust-bb183b93ea2aacc9563aee782c9a239cf57da24f.tar.gz
rust-bb183b93ea2aacc9563aee782c9a239cf57da24f.zip
testsuite: Eliminate structural records from run-fail tests
Diffstat (limited to 'src')
-rw-r--r--src/test/run-fail/issue-2272.rs8
-rw-r--r--src/test/run-fail/issue-948.rs7
-rw-r--r--src/test/run-fail/rhs-type.rs5
-rw-r--r--src/test/run-fail/unwind-rec.rs4
-rw-r--r--src/test/run-fail/unwind-rec2.rs4
5 files changed, 21 insertions, 7 deletions
diff --git a/src/test/run-fail/issue-2272.rs b/src/test/run-fail/issue-2272.rs
index 88af2c70d77..c81ef07f5d7 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 82fc5e49823..7a41eb0ca50 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 49274c90aec..54a3e9d5a97 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 cbb2fd7e5ef..200d511db54 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 993566d32d9..bf35abdafaf 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()
     };