Skip to content

Commit 8afa299

Browse files
committed
---
yaml --- r: 3856 b: refs/heads/master c: e038e8e h: refs/heads/master v: v3
1 parent af06fba commit 8afa299

File tree

4 files changed

+15
-23
lines changed

4 files changed

+15
-23
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 60cffd711655d4755f825a8495d2d1629bc10e98
2+
refs/heads/master: e038e8e52bebe33ca2d949122bf876bbb2d97936

trunk/src/comp/syntax/fold.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import syntax::codemap::span;
22
import ast::*;
33

44
import std::ivec;
5-
import std::vec;
65
import std::option;
7-
import vec::map;
86

97
export ast_fold_precursor;
108
export ast_fold;

trunk/src/comp/syntax/print/pprust.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,12 +1548,8 @@ fn constr_arg_to_str[T](&fn(&T) -> str f, &ast::constr_arg_general_[T] c) ->
15481548
fn uint_to_str(&uint i) -> str { ret uint::str(i); }
15491549
15501550
fn ast_constr_to_str(&@ast::constr c) -> str {
1551-
// TODO: Remove this vec->ivec conversion.
1552-
auto cags = ~[];
1553-
for (@ast::constr_arg_general[uint] cag in c.node.args) {
1554-
cags += ~[cag];
1555-
}
1556-
ret ast::path_to_str(c.node.path) + constr_args_to_str(uint_to_str, cags);
1551+
ret ast::path_to_str(c.node.path) +
1552+
constr_args_to_str(uint_to_str, c.node.args);
15571553
}
15581554
15591555
fn ast_constrs_str(&(@ast::constr)[] constrs) -> str {

trunk/src/comp/util/ppaux.rs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import std::io;
22
import std::ivec;
3-
import std::vec;
43
import std::str;
54
import std::int;
65
import std::option;
@@ -107,23 +106,23 @@ fn ty_to_str(&ctxt cx, &t typ) -> str {
107106
case (ty_type) { s += "type"; }
108107
case (ty_task) { s += "task"; }
109108
case (ty_tup(?elems)) {
110-
let vec[str] strs = [];
111-
for (mt tm in elems) { strs += [mt_to_str(cx, tm)]; }
112-
s += "tup(" + str::connect(strs, ",") + ")";
109+
let str[] strs = ~[];
110+
for (mt tm in elems) { strs += ~[mt_to_str(cx, tm)]; }
111+
s += "tup(" + str::connect_ivec(strs, ",") + ")";
113112
}
114113
case (ty_rec(?elems)) {
115-
let vec[str] strs = [];
116-
for (field fld in elems) { strs += [field_to_str(cx, fld)]; }
117-
s += "rec(" + str::connect(strs, ",") + ")";
114+
let str[] strs = ~[];
115+
for (field fld in elems) { strs += ~[field_to_str(cx, fld)]; }
116+
s += "rec(" + str::connect_ivec(strs, ",") + ")";
118117
}
119118
case (ty_tag(?id, ?tps)) {
120119
// The user should never see this if the cname is set properly!
121120

122121
s += "<tag#" + int::str(id._0) + ":" + int::str(id._1) + ">";
123122
if (ivec::len[t](tps) > 0u) {
124-
let vec[str] strs = [];
125-
for (t typ in tps) { strs += [ty_to_str(cx, typ)]; }
126-
s += "[" + str::connect(strs, ",") + "]";
123+
let str[] strs = ~[];
124+
for (t typ in tps) { strs += ~[ty_to_str(cx, typ)]; }
125+
s += "[" + str::connect_ivec(strs, ",") + "]";
127126
}
128127
}
129128
case (ty_fn(?proto, ?inputs, ?output, ?cf, ?constrs)) {
@@ -134,10 +133,9 @@ fn ty_to_str(&ctxt cx, &t typ) -> str {
134133
ast::return, ~[]);
135134
}
136135
case (ty_obj(?meths)) {
137-
// TODO: Remove this ivec->vec conversion.
138-
auto strs = [];
139-
for (method m in meths) { strs += [method_to_str(cx, m)]; }
140-
s += "obj {\n\t" + str::connect(strs, "\n\t") + "\n}";
136+
auto strs = ~[];
137+
for (method m in meths) { strs += ~[method_to_str(cx, m)]; }
138+
s += "obj {\n\t" + str::connect_ivec(strs, "\n\t") + "\n}";
141139
}
142140
case (ty_res(?id, _, _)) {
143141
s += "<resource#" + int::str(id._0) + ":" + int::str(id._1) + ">";

0 commit comments

Comments
 (0)