diff options
Diffstat (limited to 'src/comp/util')
| -rw-r--r-- | src/comp/util/common.rs | 5 |
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 |