aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-04-11 20:21:28 -0400
committerBrian Anderson <[email protected]>2011-04-11 21:51:23 -0400
commitce85b9eb7be9a964460a71c8b30e35693df07340 (patch)
treefd25df88f041e101fd2c6240b2ea2cb3d6413f7d /src/lib
parentMove extfmt parsing into standard library (diff)
downloadrust-ce85b9eb7be9a964460a71c8b30e35693df07340.tar.xz
rust-ce85b9eb7be9a964460a71c8b30e35693df07340.zip
Make ExtFmt call its own functions instead of others defined in std
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ExtFmt.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/ExtFmt.rs b/src/lib/ExtFmt.rs
index f7487eec..144406cf 100644
--- a/src/lib/ExtFmt.rs
+++ b/src/lib/ExtFmt.rs
@@ -258,3 +258,14 @@ fn parse_type(str s, uint i, uint lim) -> tup(ty, uint) {
ret tup(t, i + 1u);
}
+
+// Functions used by the fmt extension at runtime
+mod RT {
+ fn int_to_str(int i) -> str {
+ ret _int.to_str(i, 10u);
+ }
+
+ fn uint_to_str(uint u) -> str {
+ ret _uint.to_str(u, 10u);
+ }
+}