diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-07-26 14:06:02 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-07-26 14:06:02 +0200 |
| commit | aea537779e01359cf8da6944218362d44bfaee83 (patch) | |
| tree | 235edf688d4fb4928ff766c063dcac779548f34d /src/comp/util | |
| parent | e123366bffa69ee3877335b9ca979b0cc301d07c (diff) | |
Remove all uses of tuples from the compiler and stdlib
Diffstat (limited to 'src/comp/util')
| -rw-r--r-- | src/comp/util/common.rs | 6 | ||||
| -rw-r--r-- | src/comp/util/ppaux.rs | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/comp/util/common.rs b/src/comp/util/common.rs index a6b980a79a1..3ffef690334 100644 --- a/src/comp/util/common.rs +++ b/src/comp/util/common.rs @@ -31,13 +31,13 @@ import print::pp::mk_printer; type flag = hashmap[str, ()]; fn def_eq(&ast::def_id a, &ast::def_id b) -> bool { - ret a._0 == b._0 && a._1 == b._1; + ret a.crate == b.crate && a.node == b.node; } fn hash_def(&ast::def_id d) -> uint { auto h = 5381u; - h = (h << 5u) + h ^ (d._0 as uint); - h = (h << 5u) + h ^ (d._1 as uint); + h = (h << 5u) + h ^ (d.crate as uint); + h = (h << 5u) + h ^ (d.node as uint); ret h; } diff --git a/src/comp/util/ppaux.rs b/src/comp/util/ppaux.rs index 305ef84b85a..41209a11602 100644 --- a/src/comp/util/ppaux.rs +++ b/src/comp/util/ppaux.rs @@ -116,7 +116,7 @@ fn ty_to_str(&ctxt cx, &t typ) -> str { case (ty_tag(?id, ?tps)) { // The user should never see this if the cname is set properly! - s += "<tag#" + int::str(id._0) + ":" + int::str(id._1) + ">"; + s += "<tag#" + int::str(id.crate) + ":" + int::str(id.node) + ">"; if (ivec::len[t](tps) > 0u) { let str[] strs = ~[]; for (t typ in tps) { strs += ~[ty_to_str(cx, typ)]; } @@ -136,7 +136,8 @@ fn ty_to_str(&ctxt cx, &t typ) -> str { s += "obj {\n\t" + str::connect_ivec(strs, "\n\t") + "\n}"; } case (ty_res(?id, _, _)) { - s += "<resource#" + int::str(id._0) + ":" + int::str(id._1) + ">"; + s += "<resource#" + int::str(id.node) + ":" + + int::str(id.crate) + ">"; } case (ty_var(?v)) { s += "<T" + int::str(v) + ">"; } case (ty_param(?id)) { |
