about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-09-27 17:02:31 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-30 23:21:18 -0700
commita8ba31dbf3e7d80a069bc486a35eff8357282b68 (patch)
tree8a00829d527c443d16988b98cd7c97f1d3d4dac6 /src/libstd/rt
parentaaf6cc3a841095a95a9c74a6a2a3709dffd7a4e9 (diff)
downloadrust-a8ba31dbf3e7d80a069bc486a35eff8357282b68.tar.gz
rust-a8ba31dbf3e7d80a069bc486a35eff8357282b68.zip
std: Remove usage of fmt!
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/args.rs6
-rw-r--r--src/libstd/rt/borrowck.rs4
-rw-r--r--src/libstd/rt/comm.rs8
-rw-r--r--src/libstd/rt/context.rs6
-rw-r--r--src/libstd/rt/crate_map.rs4
-rw-r--r--src/libstd/rt/io/comm_adapters.rs22
-rw-r--r--src/libstd/rt/io/extensions.rs2
-rw-r--r--src/libstd/rt/io/file.rs30
-rw-r--r--src/libstd/rt/io/flate.rs8
-rw-r--r--src/libstd/rt/io/mem.rs14
-rw-r--r--src/libstd/rt/io/mod.rs2
-rw-r--r--src/libstd/rt/io/native/file.rs28
-rw-r--r--src/libstd/rt/io/net/ip.rs32
-rw-r--r--src/libstd/rt/io/net/tcp.rs10
-rw-r--r--src/libstd/rt/io/net/udp.rs30
-rw-r--r--src/libstd/rt/io/net/unix.rs16
-rw-r--r--src/libstd/rt/io/pipe.rs4
-rw-r--r--src/libstd/rt/io/stdio.rs22
-rw-r--r--src/libstd/rt/io/timer.rs2
-rw-r--r--src/libstd/rt/kill.rs10
-rw-r--r--src/libstd/rt/logging.rs18
-rw-r--r--src/libstd/rt/sched.rs16
-rw-r--r--src/libstd/rt/task.rs12
-rw-r--r--src/libstd/rt/test.rs6
-rw-r--r--src/libstd/rt/util.rs10
-rw-r--r--src/libstd/rt/uv/file.rs4
-rw-r--r--src/libstd/rt/uv/mod.rs4
-rw-r--r--src/libstd/rt/uv/net.rs30
-rw-r--r--src/libstd/rt/uv/process.rs2
-rw-r--r--src/libstd/rt/uv/uvio.rs8
30 files changed, 179 insertions, 191 deletions
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs
index d8317c34f50..100ea3e0546 100644
--- a/src/libstd/rt/args.rs
+++ b/src/libstd/rt/args.rs
@@ -163,14 +163,14 @@ mod imp {
     }
 
     pub fn take() -> Option<~[~str]> {
-        fail!()
+        fail2!()
     }
 
     pub fn put(_args: ~[~str]) {
-        fail!()
+        fail2!()
     }
 
     pub fn clone() -> Option<~[~str]> {
-        fail!()
+        fail2!()
     }
 }
diff --git a/src/libstd/rt/borrowck.rs b/src/libstd/rt/borrowck.rs
index 9dc0abdfbd8..d703272420c 100644
--- a/src/libstd/rt/borrowck.rs
+++ b/src/libstd/rt/borrowck.rs
@@ -78,7 +78,7 @@ unsafe fn fail_borrowed(box: *mut raw::Box<()>, file: *c_char, line: size_t) {
                     msg.push_str(sep);
                     let filename = str::raw::from_c_str(entry.file);
                     msg.push_str(filename);
-                    msg.push_str(fmt!(":%u", entry.line as uint));
+                    msg.push_str(format!(":{}", entry.line));
                     sep = " and at ";
                 }
             }
@@ -221,7 +221,7 @@ pub unsafe fn unrecord_borrow(a: *u8, old_ref_count: uint,
             assert!(!borrow_list.is_empty());
             let br = borrow_list.pop();
             if br.box != a || br.file != file || br.line != line {
-                let err = fmt!("wrong borrow found, br=%?", br);
+                let err = format!("wrong borrow found, br={:?}", br);
                 do err.with_c_str |msg_p| {
                     sys::begin_unwind_(msg_p, file, line)
                 }
diff --git a/src/libstd/rt/comm.rs b/src/libstd/rt/comm.rs
index d7b44469177..7d61b556bb5 100644
--- a/src/libstd/rt/comm.rs
+++ b/src/libstd/rt/comm.rs
@@ -196,7 +196,7 @@ impl<T> PortOne<T> {
         match self.try_recv() {
             Some(val) => val,
             None => {
-                fail!("receiving on closed channel");
+                fail2!("receiving on closed channel");
             }
         }
     }
@@ -495,7 +495,7 @@ impl<T> GenericPort<T> for Port<T> {
         match self.try_recv() {
             Some(val) => val,
             None => {
-                fail!("receiving on closed channel");
+                fail2!("receiving on closed channel");
             }
         }
     }
@@ -650,7 +650,7 @@ impl<T: Send> GenericPort<T> for SharedPort<T> {
         match self.try_recv() {
             Some(val) => val,
             None => {
-                fail!("receiving on a closed channel");
+                fail2!("receiving on a closed channel");
             }
         }
     }
@@ -770,7 +770,7 @@ mod test {
                 port.recv();
             };
             // What is our res?
-            rtdebug!("res is: %?", res.is_err());
+            rtdebug!("res is: {:?}", res.is_err());
             assert!(res.is_err());
         }
     }
diff --git a/src/libstd/rt/context.rs b/src/libstd/rt/context.rs
index 476554bf7f7..853cc08a0ba 100644
--- a/src/libstd/rt/context.rs
+++ b/src/libstd/rt/context.rs
@@ -167,9 +167,9 @@ fn initialize_call_frame(regs: &mut Registers, fptr: *c_void, arg: *c_void,
     unsafe { *sp = 0; }
 
     rtdebug!("creating call frame");
-    rtdebug!("fptr %x", fptr as uint);
-    rtdebug!("arg %x", arg as uint);
-    rtdebug!("sp %x", sp as uint);
+    rtdebug!("fptr {}", fptr as uint);
+    rtdebug!("arg {}", arg as uint);
+    rtdebug!("sp {}", sp as uint);
 
     regs[RUSTRT_ARG0] = arg as uint;
     regs[RUSTRT_RSP] = sp as uint;
diff --git a/src/libstd/rt/crate_map.rs b/src/libstd/rt/crate_map.rs
index e7876cf6571..2844cc81892 100644
--- a/src/libstd/rt/crate_map.rs
+++ b/src/libstd/rt/crate_map.rs
@@ -85,7 +85,7 @@ unsafe fn entries(crate_map: *CrateMap) -> *ModEntry {
             return (*v0).entries;
         }
         1 => return (*crate_map).entries,
-        _ => fail!("Unknown crate map version!")
+        _ => fail2!("Unknown crate map version!")
     }
 }
 
@@ -96,7 +96,7 @@ unsafe fn iterator(crate_map: *CrateMap) -> **CrateMap {
             return vec::raw::to_ptr((*v0).children);
         }
         1 => return vec::raw::to_ptr((*crate_map).children),
-        _ => fail!("Unknown crate map version!")
+        _ => fail2!("Unknown crate map version!")
     }
 }
 
diff --git a/src/libstd/rt/io/comm_adapters.rs b/src/libstd/rt/io/comm_adapters.rs
index 06424fee8bc..495d1f97cd2 100644
--- a/src/libstd/rt/io/comm_adapters.rs
+++ b/src/libstd/rt/io/comm_adapters.rs
@@ -15,45 +15,45 @@ use super::{Reader, Writer};
 struct PortReader<P>;
 
 impl<P: GenericPort<~[u8]>> PortReader<P> {
-    pub fn new(_port: P) -> PortReader<P> { fail!() }
+    pub fn new(_port: P) -> PortReader<P> { fail2!() }
 }
 
 impl<P: GenericPort<~[u8]>> Reader for PortReader<P> {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
 
-    fn eof(&mut self) -> bool { fail!() }
+    fn eof(&mut self) -> bool { fail2!() }
 }
 
 struct ChanWriter<C>;
 
 impl<C: GenericChan<~[u8]>> ChanWriter<C> {
-    pub fn new(_chan: C) -> ChanWriter<C> { fail!() }
+    pub fn new(_chan: C) -> ChanWriter<C> { fail2!() }
 }
 
 impl<C: GenericChan<~[u8]>> Writer for ChanWriter<C> {
-    fn write(&mut self, _buf: &[u8]) { fail!() }
+    fn write(&mut self, _buf: &[u8]) { fail2!() }
 
-    fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail2!() }
 }
 
 struct ReaderPort<R>;
 
 impl<R: Reader> ReaderPort<R> {
-    pub fn new(_reader: R) -> ReaderPort<R> { fail!() }
+    pub fn new(_reader: R) -> ReaderPort<R> { fail2!() }
 }
 
 impl<R: Reader> GenericPort<~[u8]> for ReaderPort<R> {
-    fn recv(&self) -> ~[u8] { fail!() }
+    fn recv(&self) -> ~[u8] { fail2!() }
 
-    fn try_recv(&self) -> Option<~[u8]> { fail!() }
+    fn try_recv(&self) -> Option<~[u8]> { fail2!() }
 }
 
 struct WriterChan<W>;
 
 impl<W: Writer> WriterChan<W> {
-    pub fn new(_writer: W) -> WriterChan<W> { fail!() }
+    pub fn new(_writer: W) -> WriterChan<W> { fail2!() }
 }
 
 impl<W: Writer> GenericChan<~[u8]> for WriterChan<W> {
-    fn send(&self, _x: ~[u8]) { fail!() }
+    fn send(&self, _x: ~[u8]) { fail2!() }
 }
diff --git a/src/libstd/rt/io/extensions.rs b/src/libstd/rt/io/extensions.rs
index 99634b532b0..69f0423bf5d 100644
--- a/src/libstd/rt/io/extensions.rs
+++ b/src/libstd/rt/io/extensions.rs
@@ -288,7 +288,7 @@ impl<T: Reader> ReaderUtil for T {
         let mut buf = [0];
         match self.read(buf) {
             Some(0) => {
-                debug!("read 0 bytes. trying again");
+                debug2!("read 0 bytes. trying again");
                 self.read_byte()
             }
             Some(1) => Some(buf[0]),
diff --git a/src/libstd/rt/io/file.rs b/src/libstd/rt/io/file.rs
index b11ee014af9..a18eec8773e 100644
--- a/src/libstd/rt/io/file.rs
+++ b/src/libstd/rt/io/file.rs
@@ -59,7 +59,7 @@ use path::Path;
 ///     }).inside {
 ///         let stream = match open(p, Create, ReadWrite) {
 ///             Some(s) => s,
-///             None => fail!("whoops! I'm sure this raised, anyways..");
+///             None => fail2!("whoops! I'm sure this raised, anyways..");
 ///         }
 ///         // do some stuff with that stream
 ///
@@ -223,7 +223,7 @@ pub fn rmdir<P: PathLike>(path: &P) {
 ///     }).inside {
 ///         let info = match stat(p) {
 ///             Some(s) => s,
-///             None => fail!("whoops! I'm sure this raised, anyways..");
+///             None => fail2!("whoops! I'm sure this raised, anyways..");
 ///         }
 ///         if stat.is_file {
 ///             // just imagine the possibilities ...
@@ -271,7 +271,7 @@ pub fn stat<P: PathLike>(path: &P) -> Option<FileStat> {
 ///                 else { cb(entry); }
 ///             }
 ///         }
-///         else { fail!("nope"); }
+///         else { fail2!("nope"); }
 ///     }
 ///
 /// # Errors
@@ -596,7 +596,7 @@ impl FileInfo for Path { }
 ///             else { cb(entry); }
 ///         }
 ///     }
-///     else { fail!("nope"); }
+///     else { fail2!("nope"); }
 /// }
 /// ```
 trait DirectoryInfo : FileSystemInfo {
@@ -631,7 +631,8 @@ trait DirectoryInfo : FileSystemInfo {
                     kind: PathAlreadyExists,
                     desc: "Path already exists",
                     detail:
-                        Some(fmt!("%s already exists; can't mkdir it", self.get_path().to_str()))
+                        Some(format!("{} already exists; can't mkdir it",
+                                     self.get_path().to_str()))
                 })
             },
             None => mkdir(self.get_path())
@@ -657,8 +658,8 @@ trait DirectoryInfo : FileSystemInfo {
                         let ioerr = IoError {
                             kind: MismatchedFileTypeForOperation,
                             desc: "Cannot do rmdir() on a non-directory",
-                            detail: Some(fmt!(
-                                "%s is a non-directory; can't rmdir it",
+                            detail: Some(format!(
+                                "{} is a non-directory; can't rmdir it",
                                 self.get_path().to_str()))
                         };
                         io_error::cond.raise(ioerr);
@@ -669,7 +670,8 @@ trait DirectoryInfo : FileSystemInfo {
                 io_error::cond.raise(IoError {
                     kind: PathDoesntExist,
                     desc: "Path doesn't exist",
-                    detail: Some(fmt!("%s doesn't exist; can't rmdir it", self.get_path().to_str()))
+                    detail: Some(format!("{} doesn't exist; can't rmdir it",
+                                         self.get_path().to_str()))
                 })
         }
     }
@@ -707,7 +709,7 @@ mod test {
                 let mut read_stream = open(filename, Open, Read).unwrap();
                 let mut read_buf = [0, .. 1028];
                 let read_str = match read_stream.read(read_buf).unwrap() {
-                    -1|0 => fail!("shouldn't happen"),
+                    -1|0 => fail2!("shouldn't happen"),
                     n => str::from_utf8(read_buf.slice_to(n))
                 };
                 assert!(read_str == message.to_owned());
@@ -875,7 +877,7 @@ mod test {
             }
             let stat_res = match stat(filename) {
                 Some(s) => s,
-                None => fail!("shouldn't happen")
+                None => fail2!("shouldn't happen")
             };
             assert!(stat_res.is_file);
             unlink(filename);
@@ -889,7 +891,7 @@ mod test {
             mkdir(filename);
             let stat_res = match stat(filename) {
                 Some(s) => s,
-                None => fail!("shouldn't happen")
+                None => fail2!("shouldn't happen")
             };
             assert!(stat_res.is_dir);
             rmdir(filename);
@@ -942,7 +944,7 @@ mod test {
             dir.mkdir();
             let prefix = "foo";
             for n in range(0,3) {
-                let f = dir.push(fmt!("%d.txt", n));
+                let f = dir.push(format!("{}.txt", n));
                 let mut w = f.open_writer(Create);
                 let msg_str = (prefix + n.to_str().to_owned()).to_owned();
                 let msg = msg_str.as_bytes();
@@ -959,14 +961,14 @@ mod test {
                             let read_str = str::from_utf8(mem);
                             let expected = match n {
                                 Some(n) => prefix+n,
-                                None => fail!("really shouldn't happen..")
+                                None => fail2!("really shouldn't happen..")
                             };
                             assert!(expected == read_str);
                         }
                         f.unlink();
                     }
                 },
-                None => fail!("shouldn't happen")
+                None => fail2!("shouldn't happen")
             }
             dir.rmdir();
         }
diff --git a/src/libstd/rt/io/flate.rs b/src/libstd/rt/io/flate.rs
index 7c72ce6ba89..72029d07263 100644
--- a/src/libstd/rt/io/flate.rs
+++ b/src/libstd/rt/io/flate.rs
@@ -29,9 +29,9 @@ impl<W: Writer> DeflateWriter<W> {
 }
 
 impl<W: Writer> Writer for DeflateWriter<W> {
-    fn write(&mut self, _buf: &[u8]) { fail!() }
+    fn write(&mut self, _buf: &[u8]) { fail2!() }
 
-    fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail2!() }
 }
 
 impl<W: Writer> Decorator<W> for DeflateWriter<W> {
@@ -68,9 +68,9 @@ impl<R: Reader> InflateReader<R> {
 }
 
 impl<R: Reader> Reader for InflateReader<R> {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
 
-    fn eof(&mut self) -> bool { fail!() }
+    fn eof(&mut self) -> bool { fail2!() }
 }
 
 impl<R: Reader> Decorator<R> for InflateReader<R> {
diff --git a/src/libstd/rt/io/mem.rs b/src/libstd/rt/io/mem.rs
index 5f6b4398c22..1f396a4476e 100644
--- a/src/libstd/rt/io/mem.rs
+++ b/src/libstd/rt/io/mem.rs
@@ -40,7 +40,7 @@ impl Writer for MemWriter {
 impl Seek for MemWriter {
     fn tell(&self) -> u64 { self.buf.len() as u64 }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
 }
 
 impl Decorator<~[u8]> for MemWriter {
@@ -102,7 +102,7 @@ impl Reader for MemReader {
 impl Seek for MemReader {
     fn tell(&self) -> u64 { self.pos as u64 }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
 }
 
 impl Decorator<~[u8]> for MemReader {
@@ -143,15 +143,15 @@ impl<'self> BufWriter<'self> {
 }
 
 impl<'self> Writer for BufWriter<'self> {
-    fn write(&mut self, _buf: &[u8]) { fail!() }
+    fn write(&mut self, _buf: &[u8]) { fail2!() }
 
-    fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail2!() }
 }
 
 impl<'self> Seek for BufWriter<'self> {
-    fn tell(&self) -> u64 { fail!() }
+    fn tell(&self) -> u64 { fail2!() }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
 }
 
 
@@ -193,7 +193,7 @@ impl<'self> Reader for BufReader<'self> {
 impl<'self> Seek for BufReader<'self> {
     fn tell(&self) -> u64 { self.pos as u64 }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
 }
 
 ///Calls a function with a MemWriter and returns
diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs
index 70fcf442f3f..c2f137ba119 100644
--- a/src/libstd/rt/io/mod.rs
+++ b/src/libstd/rt/io/mod.rs
@@ -585,7 +585,7 @@ pub fn standard_error(kind: IoErrorKind) -> IoError {
                 detail: None
             }
         }
-        _ => fail!()
+        _ => fail2!()
     }
 }
 
diff --git a/src/libstd/rt/io/native/file.rs b/src/libstd/rt/io/native/file.rs
index 31c90336a24..f5f77f4e853 100644
--- a/src/libstd/rt/io/native/file.rs
+++ b/src/libstd/rt/io/native/file.rs
@@ -25,25 +25,25 @@ impl FileDesc {
     ///
     /// The `FileDesc` takes ownership of the file descriptor
     /// and will close it upon destruction.
-    pub fn new(_fd: fd_t) -> FileDesc { fail!() }
+    pub fn new(_fd: fd_t) -> FileDesc { fail2!() }
 }
 
 impl Reader for FileDesc {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
 
-    fn eof(&mut self) -> bool { fail!() }
+    fn eof(&mut self) -> bool { fail2!() }
 }
 
 impl Writer for FileDesc {
-    fn write(&mut self, _buf: &[u8]) { fail!() }
+    fn write(&mut self, _buf: &[u8]) { fail2!() }
 
-    fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail2!() }
 }
 
 impl Seek for FileDesc {
-    fn tell(&self) -> u64 { fail!() }
+    fn tell(&self) -> u64 { fail2!() }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
 }
 
 pub struct CFile(*FILE);
@@ -53,22 +53,22 @@ impl CFile {
     ///
     /// The `CFile` takes ownership of the file descriptor
     /// and will close it upon destruction.
-    pub fn new(_file: *FILE) -> CFile { fail!() }
+    pub fn new(_file: *FILE) -> CFile { fail2!() }
 }
 
 impl Reader for CFile {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
 
-    fn eof(&mut self) -> bool { fail!() }
+    fn eof(&mut self) -> bool { fail2!() }
 }
 
 impl Writer for CFile {
-    fn write(&mut self, _buf: &[u8]) { fail!() }
+    fn write(&mut self, _buf: &[u8]) { fail2!() }
 
-    fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail2!() }
 }
 
 impl Seek for CFile {
-    fn tell(&self) -> u64 { fail!() }
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
+    fn tell(&self) -> u64 { fail2!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
 }
diff --git a/src/libstd/rt/io/net/ip.rs b/src/libstd/rt/io/net/ip.rs
index 78d5163864f..6a6619cc548 100644
--- a/src/libstd/rt/io/net/ip.rs
+++ b/src/libstd/rt/io/net/ip.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use num::FromStrRadix;
 use vec::MutableCloneableVector;
 use to_str::ToStr;
 use from_str::FromStr;
@@ -27,37 +26,22 @@ impl ToStr for IpAddr {
     fn to_str(&self) -> ~str {
         match *self {
             Ipv4Addr(a, b, c, d) =>
-                fmt!("%u.%u.%u.%u",
-                    a as uint, b as uint, c as uint, d as uint),
+                format!("{}.{}.{}.{}", a, b, c, d),
 
             // Ipv4 Compatible address
             Ipv6Addr(0, 0, 0, 0, 0, 0, g, h) => {
-                let a = fmt!("%04x", g as uint);
-                let b = FromStrRadix::from_str_radix(a.slice(2, 4), 16).unwrap();
-                let a = FromStrRadix::from_str_radix(a.slice(0, 2), 16).unwrap();
-                let c = fmt!("%04x", h as uint);
-                let d = FromStrRadix::from_str_radix(c.slice(2, 4), 16).unwrap();
-                let c = FromStrRadix::from_str_radix(c.slice(0, 2), 16).unwrap();
-
-                fmt!("::%u.%u.%u.%u", a, b, c, d)
+                format!("::{}.{}.{}.{}", (g >> 8) as u8, g as u8,
+                        (h >> 8) as u8, h as u8)
             }
 
             // Ipv4-Mapped address
             Ipv6Addr(0, 0, 0, 0, 0, 0xFFFF, g, h) => {
-                let a = fmt!("%04x", g as uint);
-                let b = FromStrRadix::from_str_radix(a.slice(2, 4), 16).unwrap();
-                let a = FromStrRadix::from_str_radix(a.slice(0, 2), 16).unwrap();
-                let c = fmt!("%04x", h as uint);
-                let d = FromStrRadix::from_str_radix(c.slice(2, 4), 16).unwrap();
-                let c = FromStrRadix::from_str_radix(c.slice(0, 2), 16).unwrap();
-
-                fmt!("::FFFF:%u.%u.%u.%u", a, b, c, d)
+                format!("::FFFF:{}.{}.{}.{}", (g >> 8) as u8, g as u8,
+                        (h >> 8) as u8, h as u8)
             }
 
             Ipv6Addr(a, b, c, d, e, f, g, h) =>
-                fmt!("%x:%x:%x:%x:%x:%x:%x:%x",
-                    a as uint, b as uint, c as uint, d as uint,
-                    e as uint, f as uint, g as uint, h as uint)
+                format!("{}:{}:{}:{}:{}:{}:{}:{}", a, b, c, d, e, f, g, h)
         }
     }
 }
@@ -72,8 +56,8 @@ pub struct SocketAddr {
 impl ToStr for SocketAddr {
     fn to_str(&self) -> ~str {
         match self.ip {
-            Ipv4Addr(*) => fmt!("%s:%u", self.ip.to_str(), self.port as uint),
-            Ipv6Addr(*) => fmt!("[%s]:%u", self.ip.to_str(), self.port as uint),
+            Ipv4Addr(*) => format!("{}:{}", self.ip.to_str(), self.port),
+            Ipv6Addr(*) => format!("[{}]:{}", self.ip.to_str(), self.port),
         }
     }
 }
diff --git a/src/libstd/rt/io/net/tcp.rs b/src/libstd/rt/io/net/tcp.rs
index 55abc4ab135..c1cda5ad681 100644
--- a/src/libstd/rt/io/net/tcp.rs
+++ b/src/libstd/rt/io/net/tcp.rs
@@ -38,7 +38,7 @@ impl TcpStream {
         match stream {
             Ok(s) => Some(TcpStream::new(s)),
             Err(ioerr) => {
-                rtdebug!("failed to connect: %?", ioerr);
+                rtdebug!("failed to connect: {:?}", ioerr);
                 io_error::cond.raise(ioerr);
                 None
             }
@@ -49,7 +49,7 @@ impl TcpStream {
         match (**self).peer_name() {
             Ok(pn) => Some(pn),
             Err(ioerr) => {
-                rtdebug!("failed to get peer name: %?", ioerr);
+                rtdebug!("failed to get peer name: {:?}", ioerr);
                 io_error::cond.raise(ioerr);
                 None
             }
@@ -60,7 +60,7 @@ impl TcpStream {
         match (**self).socket_name() {
             Ok(sn) => Some(sn),
             Err(ioerr) => {
-                rtdebug!("failed to get socket name: %?", ioerr);
+                rtdebug!("failed to get socket name: {:?}", ioerr);
                 io_error::cond.raise(ioerr);
                 None
             }
@@ -82,7 +82,7 @@ impl Reader for TcpStream {
         }
     }
 
-    fn eof(&mut self) -> bool { fail!() }
+    fn eof(&mut self) -> bool { fail2!() }
 }
 
 impl Writer for TcpStream {
@@ -117,7 +117,7 @@ impl TcpListener {
         match (**self).socket_name() {
             Ok(sn) => Some(sn),
             Err(ioerr) => {
-                rtdebug!("failed to get socket name: %?", ioerr);
+                rtdebug!("failed to get socket name: {:?}", ioerr);
                 io_error::cond.raise(ioerr);
                 None
             }
diff --git a/src/libstd/rt/io/net/udp.rs b/src/libstd/rt/io/net/udp.rs
index a65c918351a..e47b9b9e925 100644
--- a/src/libstd/rt/io/net/udp.rs
+++ b/src/libstd/rt/io/net/udp.rs
@@ -61,7 +61,7 @@ impl UdpSocket {
         match (***self).socket_name() {
             Ok(sn) => Some(sn),
             Err(ioerr) => {
-                rtdebug!("failed to get socket name: %?", ioerr);
+                rtdebug!("failed to get socket name: {:?}", ioerr);
                 io_error::cond.raise(ioerr);
                 None
             }
@@ -92,7 +92,7 @@ impl Reader for UdpStream {
         }
     }
 
-    fn eof(&mut self) -> bool { fail!() }
+    fn eof(&mut self) -> bool { fail2!() }
 }
 
 impl Writer for UdpStream {
@@ -102,7 +102,7 @@ impl Writer for UdpStream {
         }
     }
 
-    fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail2!() }
 }
 
 #[cfg(test)]
@@ -151,10 +151,10 @@ mod test {
                                 assert_eq!(buf[0], 99);
                                 assert_eq!(src, client_ip);
                             }
-                            None => fail!()
+                            None => fail2!()
                         }
                     }
-                    None => fail!()
+                    None => fail2!()
                 }
             }
 
@@ -164,7 +164,7 @@ mod test {
                         port.take().recv();
                         client.sendto([99], server_ip)
                     }
-                    None => fail!()
+                    None => fail2!()
                 }
             }
         }
@@ -190,10 +190,10 @@ mod test {
                                 assert_eq!(buf[0], 99);
                                 assert_eq!(src, client_ip);
                             }
-                            None => fail!()
+                            None => fail2!()
                         }
                     }
-                    None => fail!()
+                    None => fail2!()
                 }
             }
 
@@ -203,7 +203,7 @@ mod test {
                         port.take().recv();
                         client.sendto([99], server_ip)
                     }
-                    None => fail!()
+                    None => fail2!()
                 }
             }
         }
@@ -230,10 +230,10 @@ mod test {
                                 assert_eq!(nread, 1);
                                 assert_eq!(buf[0], 99);
                             }
-                            None => fail!()
+                            None => fail2!()
                         }
                     }
-                    None => fail!()
+                    None => fail2!()
                 }
             }
 
@@ -245,7 +245,7 @@ mod test {
                         port.take().recv();
                         stream.write([99]);
                     }
-                    None => fail!()
+                    None => fail2!()
                 }
             }
         }
@@ -272,10 +272,10 @@ mod test {
                                 assert_eq!(nread, 1);
                                 assert_eq!(buf[0], 99);
                             }
-                            None => fail!()
+                            None => fail2!()
                         }
                     }
-                    None => fail!()
+                    None => fail2!()
                 }
             }
 
@@ -287,7 +287,7 @@ mod test {
                         port.take().recv();
                         stream.write([99]);
                     }
-                    None => fail!()
+                    None => fail2!()
                 }
             }
         }
diff --git a/src/libstd/rt/io/net/unix.rs b/src/libstd/rt/io/net/unix.rs
index 1771a963ba7..07de33935ee 100644
--- a/src/libstd/rt/io/net/unix.rs
+++ b/src/libstd/rt/io/net/unix.rs
@@ -16,36 +16,36 @@ pub struct UnixStream;
 
 impl UnixStream {
     pub fn connect<P: PathLike>(_path: &P) -> Option<UnixStream> {
-        fail!()
+        fail2!()
     }
 }
 
 impl Reader for UnixStream {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
 
-    fn eof(&mut self) -> bool { fail!() }
+    fn eof(&mut self) -> bool { fail2!() }
 }
 
 impl Writer for UnixStream {
-    fn write(&mut self, _v: &[u8]) { fail!() }
+    fn write(&mut self, _v: &[u8]) { fail2!() }
 
-    fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail2!() }
 }
 
 pub struct UnixListener;
 
 impl UnixListener {
     pub fn bind<P: PathLike>(_path: &P) -> Option<UnixListener> {
-        fail!()
+        fail2!()
     }
 }
 
 impl Listener<UnixStream, UnixAcceptor> for UnixListener {
-    fn listen(self) -> Option<UnixAcceptor> { fail!() }
+    fn listen(self) -> Option<UnixAcceptor> { fail2!() }
 }
 
 pub struct UnixAcceptor;
 
 impl Acceptor<UnixStream> for UnixAcceptor {
-    fn accept(&mut self) -> Option<UnixStream> { fail!() }
+    fn accept(&mut self) -> Option<UnixStream> { fail2!() }
 }
diff --git a/src/libstd/rt/io/pipe.rs b/src/libstd/rt/io/pipe.rs
index 7e6c59ffd0b..4186cce8c8d 100644
--- a/src/libstd/rt/io/pipe.rs
+++ b/src/libstd/rt/io/pipe.rs
@@ -59,7 +59,7 @@ impl Reader for PipeStream {
         }
     }
 
-    fn eof(&mut self) -> bool { fail!() }
+    fn eof(&mut self) -> bool { fail2!() }
 }
 
 impl Writer for PipeStream {
@@ -72,5 +72,5 @@ impl Writer for PipeStream {
         }
     }
 
-    fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail2!() }
 }
diff --git a/src/libstd/rt/io/stdio.rs b/src/libstd/rt/io/stdio.rs
index 57bec79563f..734a40429a6 100644
--- a/src/libstd/rt/io/stdio.rs
+++ b/src/libstd/rt/io/stdio.rs
@@ -11,15 +11,15 @@
 use prelude::*;
 use super::{Reader, Writer};
 
-pub fn stdin() -> StdReader { fail!() }
+pub fn stdin() -> StdReader { fail2!() }
 
-pub fn stdout() -> StdWriter { fail!() }
+pub fn stdout() -> StdWriter { fail2!() }
 
-pub fn stderr() -> StdReader { fail!() }
+pub fn stderr() -> StdReader { fail2!() }
 
-pub fn print(_s: &str) { fail!() }
+pub fn print(_s: &str) { fail2!() }
 
-pub fn println(_s: &str) { fail!() }
+pub fn println(_s: &str) { fail2!() }
 
 pub enum StdStream {
     StdIn,
@@ -30,23 +30,23 @@ pub enum StdStream {
 pub struct StdReader;
 
 impl StdReader {
-    pub fn new(_stream: StdStream) -> StdReader { fail!() }
+    pub fn new(_stream: StdStream) -> StdReader { fail2!() }
 }
 
 impl Reader for StdReader {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
 
-    fn eof(&mut self) -> bool { fail!() }
+    fn eof(&mut self) -> bool { fail2!() }
 }
 
 pub struct StdWriter;
 
 impl StdWriter {
-    pub fn new(_stream: StdStream) -> StdWriter { fail!() }
+    pub fn new(_stream: StdStream) -> StdWriter { fail2!() }
 }
 
 impl Writer for StdWriter {
-    fn write(&mut self, _buf: &[u8]) { fail!() }
+    fn write(&mut self, _buf: &[u8]) { fail2!() }
 
-    fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail2!() }
 }
diff --git a/src/libstd/rt/io/timer.rs b/src/libstd/rt/io/timer.rs
index 53e4c4051e1..19b33feacbd 100644
--- a/src/libstd/rt/io/timer.rs
+++ b/src/libstd/rt/io/timer.rs
@@ -36,7 +36,7 @@ impl Timer {
         match timer {
             Ok(t) => Some(Timer(t)),
             Err(ioerr) => {
-                rtdebug!("Timer::init: failed to init: %?", ioerr);
+                rtdebug!("Timer::init: failed to init: {:?}", ioerr);
                 io_error::cond.raise(ioerr);
                 None
             }
diff --git a/src/libstd/rt/kill.rs b/src/libstd/rt/kill.rs
index 6563ac2e96f..09f99b9302e 100644
--- a/src/libstd/rt/kill.rs
+++ b/src/libstd/rt/kill.rs
@@ -306,7 +306,7 @@ impl BlockedTask {
                 match flag.compare_and_swap(KILL_RUNNING, task_ptr, Relaxed) {
                     KILL_RUNNING => Right(Killable(flag_arc)),
                     KILL_KILLED  => Left(revive_task_ptr(task_ptr, Some(flag_arc))),
-                    x            => rtabort!("can't block task! kill flag = %?", x),
+                    x            => rtabort!("can't block task! kill flag = {}", x),
                 }
             }
         }
@@ -403,7 +403,7 @@ impl KillHandle {
         // FIXME(#7544)(bblum): is it really necessary to prohibit double kill?
         match inner.unkillable.compare_and_swap(KILL_RUNNING, KILL_UNKILLABLE, Relaxed) {
             KILL_RUNNING    => { }, // normal case
-            KILL_KILLED     => if !already_failing { fail!(KILLED_MSG) },
+            KILL_KILLED     => if !already_failing { fail2!("{}", KILLED_MSG) },
             _               => rtabort!("inhibit_kill: task already unkillable"),
         }
     }
@@ -416,7 +416,7 @@ impl KillHandle {
         // FIXME(#7544)(bblum): is it really necessary to prohibit double kill?
         match inner.unkillable.compare_and_swap(KILL_UNKILLABLE, KILL_RUNNING, Relaxed) {
             KILL_UNKILLABLE => { }, // normal case
-            KILL_KILLED     => if !already_failing { fail!(KILLED_MSG) },
+            KILL_KILLED     => if !already_failing { fail2!("{}", KILLED_MSG) },
             _               => rtabort!("allow_kill: task already killable"),
         }
     }
@@ -624,7 +624,7 @@ impl Death {
                 // synchronization during unwinding or cleanup (for example,
                 // sending on a notify port). In that case failing won't help.
                 if self.unkillable == 0 && (!already_failing) && kill_handle.killed() {
-                    fail!(KILLED_MSG);
+                    fail2!("{}", KILLED_MSG);
                 },
             // This may happen during task death (see comments in collect_failure).
             None => rtassert!(self.unkillable > 0),
@@ -650,7 +650,7 @@ impl Death {
         if self.unkillable == 0 {
             // we need to decrement the counter before failing.
             self.unkillable -= 1;
-            fail!("Cannot enter a rekillable() block without a surrounding unkillable()");
+            fail2!("Cannot enter a rekillable() block without a surrounding unkillable()");
         }
         self.unkillable -= 1;
         if self.unkillable == 0 {
diff --git a/src/libstd/rt/logging.rs b/src/libstd/rt/logging.rs
index 910c1c70c34..51eb2505f55 100644
--- a/src/libstd/rt/logging.rs
+++ b/src/libstd/rt/logging.rs
@@ -90,15 +90,15 @@ fn parse_logging_spec(spec: ~str) -> ~[LogDirective]{
                         log_level = num;
                     },
                     _ => {
-                        dumb_println(fmt!("warning: invalid logging spec \
-                                           '%s', ignoring it", parts[1]));
+                        dumb_println(format!("warning: invalid logging spec \
+                                              '{}', ignoring it", parts[1]));
                         loop;
                     }
                 }
             },
             _ => {
-                dumb_println(fmt!("warning: invalid logging spec '%s',\
-                                  ignoring it", s));
+                dumb_println(format!("warning: invalid logging spec '{}',\
+                                      ignoring it", s));
                 loop;
             }
         }
@@ -165,10 +165,12 @@ fn update_log_settings(crate_map: *u8, settings: ~str) {
     }
 
     if n_matches < (dirs.len() as u32) {
-        dumb_println(fmt!("warning: got %u RUST_LOG specs but only matched %u of them.\n\
-                          You may have mistyped a RUST_LOG spec.\n\
-                          Use RUST_LOG=::help to see the list of crates and modules.\n",
-                          dirs.len() as uint, n_matches as uint));
+        dumb_println(format!("warning: got {} RUST_LOG specs but only matched\n\
+                              {} of them. You may have mistyped a RUST_LOG \
+                              spec. \n\
+                              Use RUST_LOG=::help to see the list of crates \
+                              and modules.\n",
+                             dirs.len(), n_matches));
     }
 }
 
diff --git a/src/libstd/rt/sched.rs b/src/libstd/rt/sched.rs
index ae3837af955..bddcb700433 100644
--- a/src/libstd/rt/sched.rs
+++ b/src/libstd/rt/sched.rs
@@ -191,7 +191,7 @@ impl Scheduler {
         // action will have given it away.
         let sched: ~Scheduler = Local::take();
 
-        rtdebug!("starting scheduler %u", sched.sched_id());
+        rtdebug!("starting scheduler {}", sched.sched_id());
         sched.run();
 
         // Close the idle callback.
@@ -207,7 +207,7 @@ impl Scheduler {
         // the cleanup code it runs.
         let mut stask: ~Task = Local::take();
 
-        rtdebug!("stopping scheduler %u", stask.sched.get_ref().sched_id());
+        rtdebug!("stopping scheduler {}", stask.sched.get_ref().sched_id());
 
         // Should not have any messages
         let message = stask.sched.get_mut_ref().message_queue.pop();
@@ -999,7 +999,7 @@ mod test {
                                                  Sched(t1_handle)) || {
                 rtassert!(Task::on_appropriate_sched());
             };
-            rtdebug!("task1 id: **%u**", borrow::to_uint(task1));
+            rtdebug!("task1 id: **{}**", borrow::to_uint(task1));
 
             let task2 = ~do Task::new_root(&mut normal_sched.stack_pool, None) {
                 rtassert!(Task::on_appropriate_sched());
@@ -1013,7 +1013,7 @@ mod test {
                                                  Sched(t4_handle)) {
                 rtassert!(Task::on_appropriate_sched());
             };
-            rtdebug!("task4 id: **%u**", borrow::to_uint(task4));
+            rtdebug!("task4 id: **{}**", borrow::to_uint(task4));
 
             let task1 = Cell::new(task1);
             let task2 = Cell::new(task2);
@@ -1038,7 +1038,7 @@ mod test {
                 sh.send(Shutdown);
             };
 
-            rtdebug!("normal task: %u", borrow::to_uint(normal_task));
+            rtdebug!("normal task: {}", borrow::to_uint(normal_task));
 
             let special_task = ~do Task::new_root(&mut special_sched.stack_pool, None) {
                 rtdebug!("*about to submit task1*");
@@ -1049,7 +1049,7 @@ mod test {
                 chan.take().send(());
             };
 
-            rtdebug!("special task: %u", borrow::to_uint(special_task));
+            rtdebug!("special task: {}", borrow::to_uint(special_task));
 
             let special_sched = Cell::new(special_sched);
             let normal_sched = Cell::new(normal_sched);
@@ -1238,12 +1238,12 @@ mod test {
             while (true) {
                 match p.recv() {
                     (1, end_chan) => {
-                                        debug!("%d\n", id);
+                                debug2!("{}\n", id);
                                 end_chan.send(());
                                 return;
                     }
                     (token, end_chan) => {
-                        debug!("thread: %d   got token: %d", id, token);
+                        debug2!("thread: {}   got token: {}", id, token);
                         ch.send((token - 1, end_chan));
                         if token <= n_tasks {
                             return;
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs
index 09bd89ec94a..0068d103073 100644
--- a/src/libstd/rt/task.rs
+++ b/src/libstd/rt/task.rs
@@ -225,7 +225,7 @@ impl Task {
     }
 
     pub fn run(&mut self, f: &fn()) {
-        rtdebug!("run called on task: %u", borrow::to_uint(self));
+        rtdebug!("run called on task: {}", borrow::to_uint(self));
 
         // The only try/catch block in the world. Attempt to run the task's
         // client-specified code and catch any failures.
@@ -329,7 +329,7 @@ impl Task {
 
 impl Drop for Task {
     fn drop(&mut self) {
-        rtdebug!("called drop for a task: %u", borrow::to_uint(self));
+        rtdebug!("called drop for a task: {}", borrow::to_uint(self));
         rtassert!(self.destroyed)
     }
 }
@@ -498,7 +498,7 @@ mod test {
             let result = spawntask_try(||());
             rtdebug!("trying first assert");
             assert!(result.is_ok());
-            let result = spawntask_try(|| fail!());
+            let result = spawntask_try(|| fail2!());
             rtdebug!("trying second assert");
             assert!(result.is_err());
         }
@@ -516,7 +516,7 @@ mod test {
     #[test]
     fn logging() {
         do run_in_newsched_task() {
-            info!("here i am. logging in a newsched task");
+            info2!("here i am. logging in a newsched task");
         }
     }
 
@@ -558,7 +558,7 @@ mod test {
     fn linked_failure() {
         do run_in_newsched_task() {
             let res = do spawntask_try {
-                spawntask_random(|| fail!());
+                spawntask_random(|| fail2!());
             };
             assert!(res.is_err());
         }
@@ -599,7 +599,7 @@ mod test {
             builder.future_result(|r| result = Some(r));
             builder.unlinked();
             do builder.spawn {
-                fail!();
+                fail2!();
             }
             assert_eq!(result.unwrap().recv(), Failure);
         }
diff --git a/src/libstd/rt/test.rs b/src/libstd/rt/test.rs
index e92accd283b..b6611eee9e6 100644
--- a/src/libstd/rt/test.rs
+++ b/src/libstd/rt/test.rs
@@ -114,7 +114,7 @@ mod darwin_fd_limit {
                   to_mut_unsafe_ptr(&mut size),
                   mut_null(), 0) != 0 {
             let err = last_os_error();
-            error!("raise_fd_limit: error calling sysctl: %s", err);
+            error2!("raise_fd_limit: error calling sysctl: {}", err);
             return;
         }
 
@@ -122,7 +122,7 @@ mod darwin_fd_limit {
         let mut rlim = rlimit{rlim_cur: 0, rlim_max: 0};
         if getrlimit(RLIMIT_NOFILE, to_mut_unsafe_ptr(&mut rlim)) != 0 {
             let err = last_os_error();
-            error!("raise_fd_limit: error calling getrlimit: %s", err);
+            error2!("raise_fd_limit: error calling getrlimit: {}", err);
             return;
         }
 
@@ -132,7 +132,7 @@ mod darwin_fd_limit {
         // Set our newly-increased resource limit
         if setrlimit(RLIMIT_NOFILE, to_unsafe_ptr(&rlim)) != 0 {
             let err = last_os_error();
-            error!("raise_fd_limit: error calling setrlimit: %s", err);
+            error2!("raise_fd_limit: error calling setrlimit: {}", err);
             return;
         }
     }
diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs
index 6f39cbbade3..68996a3a2a5 100644
--- a/src/libstd/rt/util.rs
+++ b/src/libstd/rt/util.rs
@@ -61,7 +61,7 @@ pub fn default_sched_threads() -> uint {
             let opt_n: Option<uint> = FromStr::from_str(nstr);
             match opt_n {
                 Some(n) if n > 0 => n,
-                _ => rtabort!("`RUST_THREADS` is `%s`, should be a positive integer", nstr)
+                _ => rtabort!("`RUST_THREADS` is `{}`, should be a positive integer", nstr)
             }
         }
         None => {
@@ -127,10 +127,10 @@ which at the time convulsed us with joy, yet which are now partly lost to my
 memory and partly incapable of presentation to others.",
         _ => "You've met with a terrible fate, haven't you?"
     };
-    rterrln!("%s", "");
-    rterrln!("%s", quote);
-    rterrln!("%s", "");
-    rterrln!("fatal runtime error: %s", msg);
+    rterrln!("{}", "");
+    rterrln!("{}", quote);
+    rterrln!("{}", "");
+    rterrln!("fatal runtime error: {}", msg);
 
     abort();
 
diff --git a/src/libstd/rt/uv/file.rs b/src/libstd/rt/uv/file.rs
index f37402d944e..dc5b512e56e 100644
--- a/src/libstd/rt/uv/file.rs
+++ b/src/libstd/rt/uv/file.rs
@@ -505,7 +505,7 @@ mod test {
                 let unlink_req = FsRequest::new();
                 let result = unlink_req.unlink_sync(&loop_, &Path(path_str));
                 assert!(result.is_ok());
-            } else { fail!("nread was 0.. wudn't expectin' that."); }
+            } else { fail2!("nread was 0.. wudn't expectin' that."); }
             loop_.close();
         }
     }
@@ -595,7 +595,7 @@ mod test {
                     assert!(uverr.is_none());
                     let loop_ = req.get_loop();
                     let stat = req.get_stat();
-                    naive_print(&loop_, fmt!("%?", stat));
+                    naive_print(&loop_, format!("{:?}", stat));
                     assert!(stat.is_dir());
                     let rmdir_req = FsRequest::new();
                     do rmdir_req.rmdir(&loop_, &path) |req,uverr| {
diff --git a/src/libstd/rt/uv/mod.rs b/src/libstd/rt/uv/mod.rs
index 95b2059d538..0c5351ea9e4 100644
--- a/src/libstd/rt/uv/mod.rs
+++ b/src/libstd/rt/uv/mod.rs
@@ -240,7 +240,7 @@ impl UvError {
 
 impl ToStr for UvError {
     fn to_str(&self) -> ~str {
-        fmt!("%s: %s", self.name(), self.desc())
+        format!("{}: {}", self.name(), self.desc())
     }
 }
 
@@ -269,7 +269,7 @@ pub fn uv_error_to_io_error(uverr: UvError) -> IoError {
             ECONNRESET => ConnectionReset,
             EPIPE => BrokenPipe,
             err => {
-                rtdebug!("uverr.code %d", err as int);
+                rtdebug!("uverr.code {}", err as int);
                 // XXX: Need to map remaining uv error types
                 OtherIoError
             }
diff --git a/src/libstd/rt/uv/net.rs b/src/libstd/rt/uv/net.rs
index 57a1a50e6af..ca42fd32f09 100644
--- a/src/libstd/rt/uv/net.rs
+++ b/src/libstd/rt/uv/net.rs
@@ -34,7 +34,7 @@ fn sockaddr_to_UvSocketAddr(addr: *uvll::sockaddr) -> UvSocketAddr {
         match addr {
             _ if is_ip4_addr(addr) => UvIpv4SocketAddr(addr as *uvll::sockaddr_in),
             _ if is_ip6_addr(addr) => UvIpv6SocketAddr(addr as *uvll::sockaddr_in6),
-            _ => fail!(),
+            _ => fail2!(),
         }
     }
 }
@@ -156,8 +156,8 @@ impl StreamWatcher {
         }
 
         extern fn read_cb(stream: *uvll::uv_stream_t, nread: ssize_t, buf: Buf) {
-            rtdebug!("buf addr: %x", buf.base as uint);
-            rtdebug!("buf len: %d", buf.len as int);
+            rtdebug!("buf addr: {}", buf.base);
+            rtdebug!("buf len: {}", buf.len);
             let mut stream_watcher: StreamWatcher = NativeHandle::from_native_handle(stream);
             let cb = stream_watcher.get_watcher_data().read_cb.get_ref();
             let status = status_to_maybe_uv_error(nread as c_int);
@@ -266,7 +266,7 @@ impl TcpWatcher {
             self.get_watcher_data().connect_cb = Some(cb);
 
             let connect_handle = ConnectRequest::new().native_handle();
-            rtdebug!("connect_t: %x", connect_handle as uint);
+            rtdebug!("connect_t: {}", connect_handle);
             do socket_addr_as_uv_socket_addr(address) |addr| {
                 let result = match addr {
                     UvIpv4SocketAddr(addr) => uvll::tcp_connect(connect_handle,
@@ -278,7 +278,7 @@ impl TcpWatcher {
             }
 
             extern fn connect_cb(req: *uvll::uv_connect_t, status: c_int) {
-                rtdebug!("connect_t: %x", req as uint);
+                rtdebug!("connect_t: {}", req);
                 let connect_request: ConnectRequest = NativeHandle::from_native_handle(req);
                 let mut stream_watcher = connect_request.stream();
                 connect_request.delete();
@@ -379,8 +379,8 @@ impl UdpWatcher {
                 return;
             }
 
-            rtdebug!("buf addr: %x", buf.base as uint);
-            rtdebug!("buf len: %d", buf.len as int);
+            rtdebug!("buf addr: {}", buf.base);
+            rtdebug!("buf len: {}", buf.len);
             let mut udp_watcher: UdpWatcher = NativeHandle::from_native_handle(handle);
             let cb = udp_watcher.get_watcher_data().udp_recv_cb.get_ref();
             let status = status_to_maybe_uv_error(nread as c_int);
@@ -652,11 +652,11 @@ mod test {
                     let buf = vec_from_uv_buf(buf);
                     let mut count = count_cell.take();
                     if status.is_none() {
-                        rtdebug!("got %d bytes", nread);
+                        rtdebug!("got {} bytes", nread);
                         let buf = buf.unwrap();
                         for byte in buf.slice(0, nread as uint).iter() {
                             assert!(*byte == count as u8);
-                            rtdebug!("%u", *byte as uint);
+                            rtdebug!("{}", *byte as uint);
                             count += 1;
                         }
                     } else {
@@ -727,12 +727,12 @@ mod test {
                     let buf = vec_from_uv_buf(buf);
                     let mut count = count_cell.take();
                     if status.is_none() {
-                        rtdebug!("got %d bytes", nread);
+                        rtdebug!("got {} bytes", nread);
                         let buf = buf.unwrap();
                         let r = buf.slice(0, nread as uint);
                         for byte in r.iter() {
                             assert!(*byte == count as u8);
-                            rtdebug!("%u", *byte as uint);
+                            rtdebug!("{}", *byte as uint);
                             count += 1;
                         }
                     } else {
@@ -798,12 +798,12 @@ mod test {
 
                 let buf = vec_from_uv_buf(buf);
                 let mut count = 0;
-                rtdebug!("got %d bytes", nread);
+                rtdebug!("got {} bytes", nread);
 
                 let buf = buf.unwrap();
                 for &byte in buf.slice(0, nread as uint).iter() {
                     assert!(byte == count as u8);
-                    rtdebug!("%u", byte as uint);
+                    rtdebug!("{}", byte as uint);
                     count += 1;
                 }
                 assert_eq!(count, MAX);
@@ -858,12 +858,12 @@ mod test {
 
                 let buf = vec_from_uv_buf(buf);
                 let mut count = 0;
-                rtdebug!("got %d bytes", nread);
+                rtdebug!("got {} bytes", nread);
 
                 let buf = buf.unwrap();
                 for &byte in buf.slice(0, nread as uint).iter() {
                     assert!(byte == count as u8);
-                    rtdebug!("%u", byte as uint);
+                    rtdebug!("{}", byte as uint);
                     count += 1;
                 }
                 assert_eq!(count, MAX);
diff --git a/src/libstd/rt/uv/process.rs b/src/libstd/rt/uv/process.rs
index ccfa1ff87db..ddaf0c28725 100644
--- a/src/libstd/rt/uv/process.rs
+++ b/src/libstd/rt/uv/process.rs
@@ -199,7 +199,7 @@ fn with_env<T>(env: Option<&[(~str, ~str)]>, f: &fn(**libc::c_char) -> T) -> T {
     // As with argv, create some temporary storage and then the actual array
     let mut envp = vec::with_capacity(env.len());
     for &(ref key, ref value) in env.iter() {
-        envp.push(fmt!("%s=%s", *key, *value).to_c_str());
+        envp.push(format!("{}={}", *key, *value).to_c_str());
     }
     let mut c_envp = vec::with_capacity(envp.len() + 1);
     for s in envp.iter() {
diff --git a/src/libstd/rt/uv/uvio.rs b/src/libstd/rt/uv/uvio.rs
index ed6e16c8fdb..f9b71db7043 100644
--- a/src/libstd/rt/uv/uvio.rs
+++ b/src/libstd/rt/uv/uvio.rs
@@ -1802,7 +1802,7 @@ fn test_simple_tcp_server_and_client() {
                 let nread = stream.read(buf).unwrap();
                 assert_eq!(nread, 8);
                 for i in range(0u, nread) {
-                    rtdebug!("%u", buf[i] as uint);
+                    rtdebug!("{}", buf[i]);
                     assert_eq!(buf[i], i as u8);
                 }
             }
@@ -1919,7 +1919,7 @@ fn test_simple_udp_server_and_client() {
                 let (nread,src) = server_socket.recvfrom(buf).unwrap();
                 assert_eq!(nread, 8);
                 for i in range(0u, nread) {
-                    rtdebug!("%u", buf[i] as uint);
+                    rtdebug!("{}", buf[i]);
                     assert_eq!(buf[i], i as u8);
                 }
                 assert_eq!(src, client_addr);
@@ -2031,13 +2031,13 @@ fn test_read_read_read() {
                 let mut total_bytes_read = 0;
                 while total_bytes_read < MAX {
                     let nread = stream.read(buf).unwrap();
-                    rtdebug!("read %u bytes", nread as uint);
+                    rtdebug!("read {} bytes", nread);
                     total_bytes_read += nread;
                     for i in range(0u, nread) {
                         assert_eq!(buf[i], 1);
                     }
                 }
-                rtdebug!("read %u bytes total", total_bytes_read as uint);
+                rtdebug!("read {} bytes total", total_bytes_read);
             }
         }
     }