about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-07-01 16:42:16 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-07-06 11:09:06 -0700
commitb9a2117475be082b2f93bbcb836b1f05ea52b5e2 (patch)
tree43b3451894d8e309724ded9fdc63a6b22befb954 /src/comp/syntax
parent0eb889f9d2512c60a8edbf2a3f06049191c07d93 (diff)
downloadrust-b9a2117475be082b2f93bbcb836b1f05ea52b5e2.tar.gz
rust-b9a2117475be082b2f93bbcb836b1f05ea52b5e2.zip
rustc: Make the various constraint-related types in middle::ty use interior vectors
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/print/pprust.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index 86ae4cbd295..beab560b8d5 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -1421,7 +1421,7 @@ fn next_comment(&ps s) -> option::t[lexer::cmnt] {
 
 
 fn constr_args_to_str[T](fn(&T) -> str  f,
-                         &vec[@ast::constr_arg_general[T]] args) -> str {
+                         &(@ast::constr_arg_general[T])[] args) -> str {
     auto comma = false;
     auto s = "(";
     for (@ast::constr_arg_general[T] a in args) {
@@ -1447,8 +1447,13 @@ fn constr_arg_to_str[T](fn(&T) -> str  f, &ast::constr_arg_general_[T] c) ->
 fn uint_to_str(&uint i) -> str { ret uint::str(i); }
 
 fn ast_constr_to_str(&@ast::constr c) -> str {
+    // TODO: Remove this vec->ivec conversion.
+    auto cag_ivec = ~[];
+    for (@ast::constr_arg_general[uint] cag in c.node.args) {
+        cag_ivec += ~[cag];
+    }
     ret ast::path_to_str(c.node.path) +
-            constr_args_to_str(uint_to_str, c.node.args);
+            constr_args_to_str(uint_to_str, cag_ivec);
 }
 
 fn ast_constrs_str(&vec[@ast::constr] constrs) -> str {