diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-07-01 12:46:14 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-07-06 11:09:06 -0700 |
| commit | 09e591c12fcfef0533c113eca7dab59cd770e521 (patch) | |
| tree | 101c57d7aa00ac9ea9ecd286ba225c72821df6db /src/comp/util | |
| parent | 9c4411ac5eb9b96fa8fac490103d95d39980cfd8 (diff) | |
| download | rust-09e591c12fcfef0533c113eca7dab59cd770e521.tar.gz rust-09e591c12fcfef0533c113eca7dab59cd770e521.zip | |
rustc: Use interior vectors for tag type parameters
Diffstat (limited to 'src/comp/util')
| -rw-r--r-- | src/comp/util/ppaux.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/comp/util/ppaux.rs b/src/comp/util/ppaux.rs index e3eb707dbf5..58ed9b6157c 100644 --- a/src/comp/util/ppaux.rs +++ b/src/comp/util/ppaux.rs @@ -1,4 +1,5 @@ import std::io; +import std::ivec; import std::vec; import std::str; import std::int; @@ -118,9 +119,9 @@ fn ty_to_str(&ctxt cx, &t typ) -> str { // The user should never see this if the cname is set properly! s += "<tag#" + int::str(id._0) + ":" + int::str(id._1) + ">"; - if (vec::len[t](tps) > 0u) { - auto f = bind ty_to_str(cx, _); - auto strs = vec::map[t, str](f, tps); + if (ivec::len[t](tps) > 0u) { + let vec[str] strs = []; + for (t typ in tps) { strs += [ty_to_str(cx, typ)]; } s += "[" + str::connect(strs, ",") + "]"; } } |
