rustc: Use interior vectors for tag type parameters
This commit is contained in:
parent
9c4411ac5e
commit
09e591c12f
5 changed files with 185 additions and 120 deletions
|
|
@ -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, ",") + "]";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue