about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-08-02 11:42:29 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-08-02 12:09:15 +0200
commit043d95a2bdc6a344f1bfc7800b0ed719dbb6c7aa (patch)
tree590e1a0e78e22608883cbf4bd7ec2166b82eb684 /src
parent8d8ff16dfeca9681f6ad56749a143f10a736c76d (diff)
downloadrust-043d95a2bdc6a344f1bfc7800b0ed719dbb6c7aa.tar.gz
rust-043d95a2bdc6a344f1bfc7800b0ed719dbb6c7aa.zip
Move ppaux::ty_to_str to new record syntax
Diffstat (limited to 'src')
-rw-r--r--src/comp/util/ppaux.rs4
-rw-r--r--src/test/compile-fail/binop-add-tup-assign.rs2
-rw-r--r--src/test/compile-fail/binop-add-tup.rs2
-rw-r--r--src/test/compile-fail/main-wrong-type.rs2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/comp/util/ppaux.rs b/src/comp/util/ppaux.rs
index fdc71f9357b..93530b26f35 100644
--- a/src/comp/util/ppaux.rs
+++ b/src/comp/util/ppaux.rs
@@ -65,7 +65,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
                       m.output, m.cf, m.constrs) + ";";
     }
     fn field_to_str(cx: &ctxt, f: &field) -> str {
-        ret mt_to_str(cx, f.mt) + " " + f.ident;
+        ret f.ident + ": " + mt_to_str(cx, f.mt);
     }
     fn mt_to_str(cx: &ctxt, m: &mt) -> str {
         let mstr;
@@ -100,7 +100,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
       ty_rec(elems) {
         let strs: str[] = ~[];
         for fld: field  in elems { strs += ~[field_to_str(cx, fld)]; }
-        s += "rec(" + str::connect_ivec(strs, ",") + ")";
+        s += "{" + str::connect_ivec(strs, ",") + "}";
       }
       ty_tag(id, tps) {
         // The user should never see this if the cname is set properly!
diff --git a/src/test/compile-fail/binop-add-tup-assign.rs b/src/test/compile-fail/binop-add-tup-assign.rs
index fbd22745ccb..4f3bc7a8ee9 100644
--- a/src/test/compile-fail/binop-add-tup-assign.rs
+++ b/src/test/compile-fail/binop-add-tup-assign.rs
@@ -1,4 +1,4 @@
 // xfail-stage0
-// error-pattern:+ cannot be applied to type `rec(bool x)`
+// error-pattern:+ cannot be applied to type `{x: bool}`
 
 fn main() { let x = {x: true}; x += {x: false}; }
\ No newline at end of file
diff --git a/src/test/compile-fail/binop-add-tup.rs b/src/test/compile-fail/binop-add-tup.rs
index 313ec76d8be..71a3be9f31b 100644
--- a/src/test/compile-fail/binop-add-tup.rs
+++ b/src/test/compile-fail/binop-add-tup.rs
@@ -1,4 +1,4 @@
 // xfail-stage0
-// error-pattern:+ cannot be applied to type `rec(bool x)`
+// error-pattern:+ cannot be applied to type `{x: bool}`
 
 fn main() { let x = {x: true} + {x: false}; }
\ No newline at end of file
diff --git a/src/test/compile-fail/main-wrong-type.rs b/src/test/compile-fail/main-wrong-type.rs
index 58b3b26a8c4..babcdde2d30 100644
--- a/src/test/compile-fail/main-wrong-type.rs
+++ b/src/test/compile-fail/main-wrong-type.rs
@@ -1,3 +1,3 @@
 // xfail-stage0
-// error-pattern:Wrong type in main function: found fn(rec(int x
+// error-pattern:Wrong type in main function: found fn(
 fn main(foo: {x: int, y: int}) { }
\ No newline at end of file