From b9a2117475be082b2f93bbcb836b1f05ea52b5e2 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 1 Jul 2011 16:42:16 -0700 Subject: rustc: Make the various constraint-related types in middle::ty use interior vectors --- src/comp/syntax/print/pprust.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/comp/syntax') 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 { -- cgit 1.4.1-3-g733a5