diff options
| author | bors <bors@rust-lang.org> | 2013-10-22 09:24:48 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-10-22 09:24:48 -0700 |
| commit | fd2c0128a7dd3cb19eda253acd01cd7905d1c7dc (patch) | |
| tree | 5e61220d514b0e59df849455008695490b2e4f42 /src/libstd/rt | |
| parent | cd8c7cf61239d4f23868b8765207026f602a79db (diff) | |
| parent | 3ed18bdd42e10f57890befe015f6861d52429e12 (diff) | |
| download | rust-fd2c0128a7dd3cb19eda253acd01cd7905d1c7dc.tar.gz rust-fd2c0128a7dd3cb19eda253acd01cd7905d1c7dc.zip | |
auto merge of #10006 : alexcrichton/rust/another-massive-rename, r=brson
Drop the `2` suffix on all of them, updating all code in the process of doing so. This is a completely automated change, and it's dependent on the snapshots going through.
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/args.rs | 6 | ||||
| -rw-r--r-- | src/libstd/rt/comm.rs | 6 | ||||
| -rw-r--r-- | src/libstd/rt/crate_map.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/io/comm_adapters.rs | 22 | ||||
| -rw-r--r-- | src/libstd/rt/io/extensions.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/io/file.rs | 18 | ||||
| -rw-r--r-- | src/libstd/rt/io/flate.rs | 8 | ||||
| -rw-r--r-- | src/libstd/rt/io/mem.rs | 14 | ||||
| -rw-r--r-- | src/libstd/rt/io/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/io/native/file.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/io/native/process.rs | 40 | ||||
| -rw-r--r-- | src/libstd/rt/io/net/tcp.rs | 6 | ||||
| -rw-r--r-- | src/libstd/rt/io/net/udp.rs | 28 | ||||
| -rw-r--r-- | src/libstd/rt/io/net/unix.rs | 16 | ||||
| -rw-r--r-- | src/libstd/rt/io/pipe.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/kill.rs | 8 | ||||
| -rw-r--r-- | src/libstd/rt/sched.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/task.rs | 6 | ||||
| -rw-r--r-- | src/libstd/rt/test.rs | 6 | ||||
| -rw-r--r-- | src/libstd/rt/uv/file.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/uv/net.rs | 2 |
21 files changed, 103 insertions, 103 deletions
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs index 315de4b9af3..24143ba040b 100644 --- a/src/libstd/rt/args.rs +++ b/src/libstd/rt/args.rs @@ -163,14 +163,14 @@ mod imp { } pub fn take() -> Option<~[~str]> { - fail2!() + fail!() } pub fn put(_args: ~[~str]) { - fail2!() + fail!() } pub fn clone() -> Option<~[~str]> { - fail2!() + fail!() } } diff --git a/src/libstd/rt/comm.rs b/src/libstd/rt/comm.rs index 3e3431b32c9..4eae8bdc9a8 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 => { - fail2!("receiving on closed channel"); + fail!("receiving on closed channel"); } } } @@ -495,7 +495,7 @@ impl<T> GenericPort<T> for Port<T> { match self.try_recv() { Some(val) => val, None => { - fail2!("receiving on closed channel"); + fail!("receiving on closed channel"); } } } @@ -650,7 +650,7 @@ impl<T: Send> GenericPort<T> for SharedPort<T> { match self.try_recv() { Some(val) => val, None => { - fail2!("receiving on a closed channel"); + fail!("receiving on a closed channel"); } } } diff --git a/src/libstd/rt/crate_map.rs b/src/libstd/rt/crate_map.rs index 96a0069e851..d33e1af90f8 100644 --- a/src/libstd/rt/crate_map.rs +++ b/src/libstd/rt/crate_map.rs @@ -93,7 +93,7 @@ fn do_iter_crate_map<'a>(crate_map: &'a CrateMap<'a>, f: &fn(&ModEntry), do_iter_crate_map(*child, |x| f(x), visited); } }, - _ => fail2!("invalid crate map version") + _ => fail!("invalid crate map version") } } } 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!() } } diff --git a/src/libstd/rt/kill.rs b/src/libstd/rt/kill.rs index 6043ae318fe..8029e3f6431 100644 --- a/src/libstd/rt/kill.rs +++ b/src/libstd/rt/kill.rs @@ -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 { fail2!("{}", KILLED_MSG) }, + KILL_KILLED => if !already_failing { fail!("{}", 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 { fail2!("{}", KILLED_MSG) }, + KILL_KILLED => if !already_failing { fail!("{}", 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() { - fail2!("{}", KILLED_MSG); + fail!("{}", 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; - fail2!("Cannot enter a rekillable() block without a surrounding unkillable()"); + fail!("Cannot enter a rekillable() block without a surrounding unkillable()"); } self.unkillable -= 1; if self.unkillable == 0 { diff --git a/src/libstd/rt/sched.rs b/src/libstd/rt/sched.rs index 93ac308df3a..336d2518e43 100644 --- a/src/libstd/rt/sched.rs +++ b/src/libstd/rt/sched.rs @@ -1292,12 +1292,12 @@ mod test { while (true) { match p.recv() { (1, end_chan) => { - debug2!("{}\n", id); + debug!("{}\n", id); end_chan.send(()); return; } (token, end_chan) => { - debug2!("thread: {} got token: {}", id, token); + debug!("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 28c38ac9b53..a6f9e11e40e 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -626,7 +626,7 @@ mod test { let result = spawntask_try(||()); rtdebug!("trying first assert"); assert!(result.is_ok()); - let result = spawntask_try(|| fail2!()); + let result = spawntask_try(|| fail!()); rtdebug!("trying second assert"); assert!(result.is_err()); } @@ -644,7 +644,7 @@ mod test { #[test] fn logging() { do run_in_newsched_task() { - info2!("here i am. logging in a newsched task"); + info!("here i am. logging in a newsched task"); } } @@ -686,7 +686,7 @@ mod test { fn linked_failure() { do run_in_newsched_task() { let res = do spawntask_try { - spawntask_random(|| fail2!()); + spawntask_random(|| fail!()); }; assert!(res.is_err()); } diff --git a/src/libstd/rt/test.rs b/src/libstd/rt/test.rs index 9f4e6558ac5..4f7ebb4a721 100644 --- a/src/libstd/rt/test.rs +++ b/src/libstd/rt/test.rs @@ -115,7 +115,7 @@ mod darwin_fd_limit { to_mut_unsafe_ptr(&mut size), mut_null(), 0) != 0 { let err = last_os_error(); - error2!("raise_fd_limit: error calling sysctl: {}", err); + error!("raise_fd_limit: error calling sysctl: {}", err); return; } @@ -123,7 +123,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(); - error2!("raise_fd_limit: error calling getrlimit: {}", err); + error!("raise_fd_limit: error calling getrlimit: {}", err); return; } @@ -133,7 +133,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(); - error2!("raise_fd_limit: error calling setrlimit: {}", err); + error!("raise_fd_limit: error calling setrlimit: {}", err); return; } } diff --git a/src/libstd/rt/uv/file.rs b/src/libstd/rt/uv/file.rs index cb5054626d4..3a6d858df79 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::new(path_str)); assert!(result.is_ok()); - } else { fail2!("nread was 0.. wudn't expectin' that."); } + } else { fail!("nread was 0.. wudn't expectin' that."); } loop_.close(); } } diff --git a/src/libstd/rt/uv/net.rs b/src/libstd/rt/uv/net.rs index 2c27db982aa..a2608bf6b24 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), - _ => fail2!(), + _ => fail!(), } } } |
