aboutsummaryrefslogtreecommitdiff
path: root/src/comp/util/common.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-23 17:16:34 -0700
committerGraydon Hoare <[email protected]>2010-09-23 17:16:34 -0700
commit2db1f864e23e38d26b6dfb1e0a00829122a6aefd (patch)
treea202f8803da270d30401db8d39b0f01b6632df86 /src/comp/util/common.rs
parentResolve constant types through to their definitions. (diff)
downloadrust-2db1f864e23e38d26b6dfb1e0a00829122a6aefd.tar.xz
rust-2db1f864e23e38d26b6dfb1e0a00829122a6aefd.zip
Declare the global and upcall glues as ValueRefs in rustc's trans.
Diffstat (limited to 'src/comp/util/common.rs')
-rw-r--r--src/comp/util/common.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comp/util/common.rs b/src/comp/util/common.rs
index 9952c89b..7456a8c8 100644
--- a/src/comp/util/common.rs
+++ b/src/comp/util/common.rs
@@ -1,4 +1,5 @@
import std._uint;
+import std._int;
type pos = rec(uint line, uint col);
type span = rec(str filename, pos lo, pos hi);
@@ -41,6 +42,10 @@ fn new_str_hash[V]() -> std.map.hashmap[str,V] {
ret std.map.mk_hashmap[str,V](hasher, eqer);
}
+fn istr(int i) -> str {
+ ret _int.to_str(i, 10u);
+}
+
//
// Local Variables:
// mode: rust