about summary refs log tree commit diff
path: root/src/libstd/rt/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/rt/io')
-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.rs18
-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.rs4
-rw-r--r--src/libstd/rt/io/native/process.rs40
-rw-r--r--src/libstd/rt/io/net/tcp.rs6
-rw-r--r--src/libstd/rt/io/net/udp.rs28
-rw-r--r--src/libstd/rt/io/net/unix.rs16
-rw-r--r--src/libstd/rt/io/pipe.rs4
12 files changed, 82 insertions, 82 deletions
diff --git a/src/libstd/rt/io/comm_adapters.rs b/src/libstd/rt/io/comm_adapters.rs
index 495d1f97cd2..06424fee8bc 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> { fail2!() }
+    pub fn new(_port: P) -> PortReader<P> { fail!() }
 }
 
 impl<P: GenericPort<~[u8]>> Reader for PortReader<P> {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 struct ChanWriter<C>;
 
 impl<C: GenericChan<~[u8]>> ChanWriter<C> {
-    pub fn new(_chan: C) -> ChanWriter<C> { fail2!() }
+    pub fn new(_chan: C) -> ChanWriter<C> { fail!() }
 }
 
 impl<C: GenericChan<~[u8]>> Writer for ChanWriter<C> {
-    fn write(&mut self, _buf: &[u8]) { fail2!() }
+    fn write(&mut self, _buf: &[u8]) { fail!() }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 struct ReaderPort<R>;
 
 impl<R: Reader> ReaderPort<R> {
-    pub fn new(_reader: R) -> ReaderPort<R> { fail2!() }
+    pub fn new(_reader: R) -> ReaderPort<R> { fail!() }
 }
 
 impl<R: Reader> GenericPort<~[u8]> for ReaderPort<R> {
-    fn recv(&self) -> ~[u8] { fail2!() }
+    fn recv(&self) -> ~[u8] { fail!() }
 
-    fn try_recv(&self) -> Option<~[u8]> { fail2!() }
+    fn try_recv(&self) -> Option<~[u8]> { fail!() }
 }
 
 struct WriterChan<W>;
 
 impl<W: Writer> WriterChan<W> {
-    pub fn new(_writer: W) -> WriterChan<W> { fail2!() }
+    pub fn new(_writer: W) -> WriterChan<W> { fail!() }
 }
 
 impl<W: Writer> GenericChan<~[u8]> for WriterChan<W> {
-    fn send(&self, _x: ~[u8]) { fail2!() }
+    fn send(&self, _x: ~[u8]) { fail!() }
 }
diff --git a/src/libstd/rt/io/extensions.rs b/src/libstd/rt/io/extensions.rs
index 69f0423bf5d..99634b532b0 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) => {
-                debug2!("read 0 bytes. trying again");
+                debug!("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 39c3c5692f8..a5d593d2454 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 => fail2!("whoops! I'm sure this raised, anyways..");
+///             None => fail!("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 => fail2!("whoops! I'm sure this raised, anyways..");
+///             None => fail!("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 { fail2!("nope"); }
+///         else { fail!("nope"); }
 ///     }
 ///
 /// # Errors
@@ -596,7 +596,7 @@ impl FileInfo for Path { }
 ///             else { cb(entry); }
 ///         }
 ///     }
-///     else { fail2!("nope"); }
+///     else { fail!("nope"); }
 /// }
 /// ```
 pub trait DirectoryInfo : FileSystemInfo {
@@ -713,7 +713,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 => fail2!("shouldn't happen"),
+                    -1|0 => fail!("shouldn't happen"),
                     n => str::from_utf8(read_buf.slice_to(n))
                 };
                 assert!(read_str == message.to_owned());
@@ -881,7 +881,7 @@ mod test {
             }
             let stat_res = match stat(filename) {
                 Some(s) => s,
-                None => fail2!("shouldn't happen")
+                None => fail!("shouldn't happen")
             };
             assert!(stat_res.is_file);
             unlink(filename);
@@ -895,7 +895,7 @@ mod test {
             mkdir(filename);
             let stat_res = match stat(filename) {
                 Some(s) => s,
-                None => fail2!("shouldn't happen")
+                None => fail!("shouldn't happen")
             };
             assert!(stat_res.is_dir);
             rmdir(filename);
@@ -964,7 +964,7 @@ mod test {
                             r.read(mem);
                             let read_str = str::from_utf8(mem);
                             let expected = match n {
-                                None|Some("") => fail2!("really shouldn't happen.."),
+                                None|Some("") => fail!("really shouldn't happen.."),
                                 Some(n) => prefix+n
                             };
                             assert!(expected == read_str);
@@ -972,7 +972,7 @@ mod test {
                         f.unlink();
                     }
                 },
-                None => fail2!("shouldn't happen")
+                None => fail!("shouldn't happen")
             }
             dir.rmdir();
         }
diff --git a/src/libstd/rt/io/flate.rs b/src/libstd/rt/io/flate.rs
index 72029d07263..7c72ce6ba89 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]) { fail2!() }
+    fn write(&mut self, _buf: &[u8]) { fail!() }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 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> { fail2!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 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 1f396a4476e..5f6b4398c22 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) { fail2!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
 }
 
 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) { fail2!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
 }
 
 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]) { fail2!() }
+    fn write(&mut self, _buf: &[u8]) { fail!() }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 impl<'self> Seek for BufWriter<'self> {
-    fn tell(&self) -> u64 { fail2!() }
+    fn tell(&self) -> u64 { fail!() }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
 }
 
 
@@ -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) { fail2!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
 }
 
 ///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 d505c97ba0f..c0971b5d3cd 100644
--- a/src/libstd/rt/io/mod.rs
+++ b/src/libstd/rt/io/mod.rs
@@ -611,7 +611,7 @@ pub fn standard_error(kind: IoErrorKind) -> IoError {
                 detail: None
             }
         }
-        _ => fail2!()
+        _ => fail!()
     }
 }
 
diff --git a/src/libstd/rt/io/native/file.rs b/src/libstd/rt/io/native/file.rs
index dc8d34d1b11..d6820981181 100644
--- a/src/libstd/rt/io/native/file.rs
+++ b/src/libstd/rt/io/native/file.rs
@@ -241,7 +241,7 @@ mod tests {
                     assert_eq!(buf[2], 's' as u8);
                     assert_eq!(buf[3], 't' as u8);
                 }
-                r => fail2!("invalid read: {:?}", r)
+                r => fail!("invalid read: {:?}", r)
             }
 
             let mut raised = false;
@@ -276,7 +276,7 @@ mod tests {
                     assert_eq!(buf[2], 's' as u8);
                     assert_eq!(buf[3], 't' as u8);
                 }
-                r => fail2!("invalid read: {:?}", r)
+                r => fail!("invalid read: {:?}", r)
             }
         }
     }
diff --git a/src/libstd/rt/io/native/process.rs b/src/libstd/rt/io/native/process.rs
index 57367beacd8..91fff6d9263 100644
--- a/src/libstd/rt/io/native/process.rs
+++ b/src/libstd/rt/io/native/process.rs
@@ -124,7 +124,7 @@ impl Process {
     pub fn input<'a>(&'a mut self) -> &'a mut io::Writer {
         match self.input {
             Some(ref mut fd) => fd as &mut io::Writer,
-            None => fail2!("This process has no stdin")
+            None => fail!("This process has no stdin")
         }
     }
 
@@ -138,7 +138,7 @@ impl Process {
     pub fn output<'a>(&'a mut self) -> &'a mut io::Reader {
         match self.input {
             Some(ref mut fd) => fd as &mut io::Reader,
-            None => fail2!("This process has no stdout")
+            None => fail!("This process has no stdout")
         }
     }
 
@@ -152,7 +152,7 @@ impl Process {
     pub fn error<'a>(&'a mut self) -> &'a mut io::Reader {
         match self.error {
             Some(ref mut fd) => fd as &mut io::Reader,
-            None => fail2!("This process has no stderr")
+            None => fail!("This process has no stderr")
         }
     }
 
@@ -283,29 +283,29 @@ fn spawn_process_os(prog: &str, args: &[~str],
 
         let orig_std_in = get_osfhandle(in_fd) as HANDLE;
         if orig_std_in == INVALID_HANDLE_VALUE as HANDLE {
-            fail2!("failure in get_osfhandle: {}", os::last_os_error());
+            fail!("failure in get_osfhandle: {}", os::last_os_error());
         }
         if DuplicateHandle(cur_proc, orig_std_in, cur_proc, &mut si.hStdInput,
                            0, TRUE, DUPLICATE_SAME_ACCESS) == FALSE {
-            fail2!("failure in DuplicateHandle: {}", os::last_os_error());
+            fail!("failure in DuplicateHandle: {}", os::last_os_error());
         }
 
         let orig_std_out = get_osfhandle(out_fd) as HANDLE;
         if orig_std_out == INVALID_HANDLE_VALUE as HANDLE {
-            fail2!("failure in get_osfhandle: {}", os::last_os_error());
+            fail!("failure in get_osfhandle: {}", os::last_os_error());
         }
         if DuplicateHandle(cur_proc, orig_std_out, cur_proc, &mut si.hStdOutput,
                            0, TRUE, DUPLICATE_SAME_ACCESS) == FALSE {
-            fail2!("failure in DuplicateHandle: {}", os::last_os_error());
+            fail!("failure in DuplicateHandle: {}", os::last_os_error());
         }
 
         let orig_std_err = get_osfhandle(err_fd) as HANDLE;
         if orig_std_err == INVALID_HANDLE_VALUE as HANDLE {
-            fail2!("failure in get_osfhandle: {}", os::last_os_error());
+            fail!("failure in get_osfhandle: {}", os::last_os_error());
         }
         if DuplicateHandle(cur_proc, orig_std_err, cur_proc, &mut si.hStdError,
                            0, TRUE, DUPLICATE_SAME_ACCESS) == FALSE {
-            fail2!("failure in DuplicateHandle: {}", os::last_os_error());
+            fail!("failure in DuplicateHandle: {}", os::last_os_error());
         }
 
         let cmd = make_command_line(prog, args);
@@ -330,7 +330,7 @@ fn spawn_process_os(prog: &str, args: &[~str],
         CloseHandle(si.hStdError);
 
         for msg in create_err.iter() {
-            fail2!("failure in CreateProcess: {}", *msg);
+            fail!("failure in CreateProcess: {}", *msg);
         }
 
         // We close the thread handle because we don't care about keeping the
@@ -471,7 +471,7 @@ fn spawn_process_os(prog: &str, args: &[~str],
 
         let pid = fork();
         if pid < 0 {
-            fail2!("failure in fork: {}", os::last_os_error());
+            fail!("failure in fork: {}", os::last_os_error());
         } else if pid > 0 {
             return SpawnProcessResult {pid: pid, handle: ptr::null()};
         }
@@ -479,13 +479,13 @@ fn spawn_process_os(prog: &str, args: &[~str],
         rustrt::rust_unset_sigprocmask();
 
         if dup2(in_fd, 0) == -1 {
-            fail2!("failure in dup2(in_fd, 0): {}", os::last_os_error());
+            fail!("failure in dup2(in_fd, 0): {}", os::last_os_error());
         }
         if dup2(out_fd, 1) == -1 {
-            fail2!("failure in dup2(out_fd, 1): {}", os::last_os_error());
+            fail!("failure in dup2(out_fd, 1): {}", os::last_os_error());
         }
         if dup2(err_fd, 2) == -1 {
-            fail2!("failure in dup3(err_fd, 2): {}", os::last_os_error());
+            fail!("failure in dup3(err_fd, 2): {}", os::last_os_error());
         }
         // close all other fds
         for fd in range(3, getdtablesize()).invert() {
@@ -494,7 +494,7 @@ fn spawn_process_os(prog: &str, args: &[~str],
 
         do with_dirp(dir) |dirp| {
             if !dirp.is_null() && chdir(dirp) == -1 {
-                fail2!("failure in chdir: {}", os::last_os_error());
+                fail!("failure in chdir: {}", os::last_os_error());
             }
         }
 
@@ -505,7 +505,7 @@ fn spawn_process_os(prog: &str, args: &[~str],
             do with_argv(prog, args) |argv| {
                 execvp(*argv, argv);
                 // execvp only returns if an error occurred
-                fail2!("failure in execvp: {}", os::last_os_error());
+                fail!("failure in execvp: {}", os::last_os_error());
             }
         }
     }
@@ -651,14 +651,14 @@ fn waitpid(pid: pid_t) -> int {
 
             let proc = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION, FALSE, pid as DWORD);
             if proc.is_null() {
-                fail2!("failure in OpenProcess: {}", os::last_os_error());
+                fail!("failure in OpenProcess: {}", os::last_os_error());
             }
 
             loop {
                 let mut status = 0;
                 if GetExitCodeProcess(proc, &mut status) == FALSE {
                     CloseHandle(proc);
-                    fail2!("failure in GetExitCodeProcess: {}", os::last_os_error());
+                    fail!("failure in GetExitCodeProcess: {}", os::last_os_error());
                 }
                 if status != STILL_ACTIVE {
                     CloseHandle(proc);
@@ -666,7 +666,7 @@ fn waitpid(pid: pid_t) -> int {
                 }
                 if WaitForSingleObject(proc, INFINITE) == WAIT_FAILED {
                     CloseHandle(proc);
-                    fail2!("failure in WaitForSingleObject: {}", os::last_os_error());
+                    fail!("failure in WaitForSingleObject: {}", os::last_os_error());
                 }
             }
         }
@@ -704,7 +704,7 @@ fn waitpid(pid: pid_t) -> int {
 
         let mut status = 0 as c_int;
         if unsafe { waitpid(pid, &mut status, 0) } == -1 {
-            fail2!("failure in waitpid: {}", os::last_os_error());
+            fail!("failure in waitpid: {}", os::last_os_error());
         }
 
         return if WIFEXITED(status) {
diff --git a/src/libstd/rt/io/net/tcp.rs b/src/libstd/rt/io/net/tcp.rs
index 3b894b9d331..f29e17cfc2f 100644
--- a/src/libstd/rt/io/net/tcp.rs
+++ b/src/libstd/rt/io/net/tcp.rs
@@ -84,7 +84,7 @@ impl Reader for TcpStream {
         }
     }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 impl Writer for TcpStream {
@@ -324,7 +324,7 @@ mod test {
                     if cfg!(windows) {
                         assert_eq!(e.kind, NotConnected);
                     } else {
-                        fail2!();
+                        fail!();
                     }
                 }).inside {
                     let nread = stream.read(buf);
@@ -359,7 +359,7 @@ mod test {
                     if cfg!(windows) {
                         assert_eq!(e.kind, NotConnected);
                     } else {
-                        fail2!();
+                        fail!();
                     }
                 }).inside {
                     let nread = stream.read(buf);
diff --git a/src/libstd/rt/io/net/udp.rs b/src/libstd/rt/io/net/udp.rs
index 2f9babf5789..27faae0838b 100644
--- a/src/libstd/rt/io/net/udp.rs
+++ b/src/libstd/rt/io/net/udp.rs
@@ -94,7 +94,7 @@ impl Reader for UdpStream {
         }
     }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 impl Writer for UdpStream {
@@ -104,7 +104,7 @@ impl Writer for UdpStream {
         }
     }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 #[cfg(test)]
@@ -153,10 +153,10 @@ mod test {
                                 assert_eq!(buf[0], 99);
                                 assert_eq!(src, client_ip);
                             }
-                            None => fail2!()
+                            None => fail!()
                         }
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
 
@@ -166,7 +166,7 @@ mod test {
                         port.take().recv();
                         client.sendto([99], server_ip)
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
         }
@@ -192,10 +192,10 @@ mod test {
                                 assert_eq!(buf[0], 99);
                                 assert_eq!(src, client_ip);
                             }
-                            None => fail2!()
+                            None => fail!()
                         }
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
 
@@ -205,7 +205,7 @@ mod test {
                         port.take().recv();
                         client.sendto([99], server_ip)
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
         }
@@ -232,10 +232,10 @@ mod test {
                                 assert_eq!(nread, 1);
                                 assert_eq!(buf[0], 99);
                             }
-                            None => fail2!()
+                            None => fail!()
                         }
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
 
@@ -247,7 +247,7 @@ mod test {
                         port.take().recv();
                         stream.write([99]);
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
         }
@@ -274,10 +274,10 @@ mod test {
                                 assert_eq!(nread, 1);
                                 assert_eq!(buf[0], 99);
                             }
-                            None => fail2!()
+                            None => fail!()
                         }
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
 
@@ -289,7 +289,7 @@ mod test {
                         port.take().recv();
                         stream.write([99]);
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
         }
diff --git a/src/libstd/rt/io/net/unix.rs b/src/libstd/rt/io/net/unix.rs
index 07de33935ee..1771a963ba7 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> {
-        fail2!()
+        fail!()
     }
 }
 
 impl Reader for UnixStream {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 impl Writer for UnixStream {
-    fn write(&mut self, _v: &[u8]) { fail2!() }
+    fn write(&mut self, _v: &[u8]) { fail!() }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 pub struct UnixListener;
 
 impl UnixListener {
     pub fn bind<P: PathLike>(_path: &P) -> Option<UnixListener> {
-        fail2!()
+        fail!()
     }
 }
 
 impl Listener<UnixStream, UnixAcceptor> for UnixListener {
-    fn listen(self) -> Option<UnixAcceptor> { fail2!() }
+    fn listen(self) -> Option<UnixAcceptor> { fail!() }
 }
 
 pub struct UnixAcceptor;
 
 impl Acceptor<UnixStream> for UnixAcceptor {
-    fn accept(&mut self) -> Option<UnixStream> { fail2!() }
+    fn accept(&mut self) -> Option<UnixStream> { fail!() }
 }
diff --git a/src/libstd/rt/io/pipe.rs b/src/libstd/rt/io/pipe.rs
index 251795ab238..d2cd531ed26 100644
--- a/src/libstd/rt/io/pipe.rs
+++ b/src/libstd/rt/io/pipe.rs
@@ -64,7 +64,7 @@ impl Reader for PipeStream {
         }
     }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 impl Writer for PipeStream {
@@ -77,5 +77,5 @@ impl Writer for PipeStream {
         }
     }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }