diff options
| author | Eric Holk <eric.holk@gmail.com> | 2012-06-28 15:00:03 -0700 |
|---|---|---|
| committer | Eric Holk <eric.holk@gmail.com> | 2012-06-28 15:11:09 -0700 |
| commit | 87eaf91be34e1a6e38e4a043102910e1f3e77824 (patch) | |
| tree | 9aba96871ad4d79524b1339364603df966073c2b /src/rustc/util | |
| parent | 54713afa20a9e3cb09ffe678aeb7d32630ef7b59 (diff) | |
| download | rust-87eaf91be34e1a6e38e4a043102910e1f3e77824.tar.gz rust-87eaf91be34e1a6e38e4a043102910e1f3e77824.zip | |
Replaced almost all vector+ in rustc (#2719)
Didn't update shape because the changes were causing segfaults.
Diffstat (limited to 'src/rustc/util')
| -rw-r--r-- | src/rustc/util/ppaux.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rustc/util/ppaux.rs b/src/rustc/util/ppaux.rs index 5d2098a2e5f..d7a25fabfa6 100644 --- a/src/rustc/util/ppaux.rs +++ b/src/rustc/util/ppaux.rs @@ -133,7 +133,7 @@ fn ty_to_str(cx: ctxt, typ: t) -> str { alt ident { some(i) { s += " "; s += *i; } _ { } } s += "("; let mut strs = []/~; - for inputs.each {|a| strs += [fn_input_to_str(cx, a)]/~; } + for inputs.each {|a| vec::push(strs, fn_input_to_str(cx, a)); } s += str::connect(strs, ", "); s += ")"; if ty::get(output).struct != ty_nil { @@ -190,12 +190,12 @@ fn ty_to_str(cx: ctxt, typ: t) -> str { ty_type { "type" } ty_rec(elems) { let mut strs: [str]/~ = []/~; - for elems.each {|fld| strs += [field_to_str(cx, fld)]/~; } + for elems.each {|fld| vec::push(strs, field_to_str(cx, fld)); } "{" + str::connect(strs, ",") + "}" } ty_tup(elems) { let mut strs = []/~; - for elems.each {|elem| strs += [ty_to_str(cx, elem)]/~; } + for elems.each {|elem| vec::push(strs, ty_to_str(cx, elem)); } "(" + str::connect(strs, ",") + ")" } ty_fn(f) { |
