aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle/ty.rs
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-02-25 19:42:26 -0800
committerPatrick Walton <[email protected]>2011-02-25 19:42:26 -0800
commit0120571e90a68befb03892c63c470d0923d425c4 (patch)
treed9308c96868da071396d08028412dd3d72b5ed89 /src/comp/middle/ty.rs
parentrustc: Eliminate the "ty_params" field from the tag info (diff)
downloadrust-0120571e90a68befb03892c63c470d0923d425c4.tar.xz
rust-0120571e90a68befb03892c63c470d0923d425c4.zip
rustc: Make the tag info table keyed by both tag ID and type parameter. Also fix a bug that was causing all tags to compare equal.
Diffstat (limited to 'src/comp/middle/ty.rs')
-rw-r--r--src/comp/middle/ty.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index f19c2997..25ef8709 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -247,9 +247,10 @@ fn ty_to_str(&@t typ) -> str {
s = "rec(" + _str.connect(strs, ",") + ")";
}
- case (ty_tag(_, ?tps)) {
+ case (ty_tag(?id, ?tps)) {
// The user should never see this if the cname is set properly!
- s = "<tag>";
+ s = "<tag#" + util.common.istr(id._0) + ":" +
+ util.common.istr(id._1) + ">";
if (_vec.len[@t](tps) > 0u) {
auto f = ty_to_str;
auto strs = _vec.map[@t,str](f, tps);