about summary refs log tree commit diff
path: root/src/libnative
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-16 08:16:49 +0000
committerbors <bors@rust-lang.org>2014-06-16 08:16:49 +0000
commit7ec78053ec5fcabd5f8ca98627dd45bfa5fc4cd4 (patch)
tree1ea55f8c25540e7339e27fe9dd79cadbc332634f /src/libnative
parent2ef910f71ab83761b1f5f9144621f246622e92d8 (diff)
parent89b0e6e12ba2fb24ec0e6655a1130c16eb8d1745 (diff)
downloadrust-7ec78053ec5fcabd5f8ca98627dd45bfa5fc4cd4.tar.gz
rust-7ec78053ec5fcabd5f8ca98627dd45bfa5fc4cd4.zip
auto merge of #14900 : alexcrichton/rust/snapshots, r=huonw
Closes #14898
Closes #14918
Diffstat (limited to 'src/libnative')
-rw-r--r--src/libnative/io/file_unix.rs4
-rw-r--r--src/libnative/io/file_win32.rs4
-rw-r--r--src/libnative/io/mod.rs50
-rw-r--r--src/libnative/io/net.rs16
-rw-r--r--src/libnative/io/pipe_unix.rs12
-rw-r--r--src/libnative/io/pipe_win32.rs12
-rw-r--r--src/libnative/io/timer_unix.rs6
-rw-r--r--src/libnative/io/timer_win32.rs6
8 files changed, 55 insertions, 55 deletions
diff --git a/src/libnative/io/file_unix.rs b/src/libnative/io/file_unix.rs
index f521934c0f9..6472356ea16 100644
--- a/src/libnative/io/file_unix.rs
+++ b/src/libnative/io/file_unix.rs
@@ -168,8 +168,8 @@ impl rtio::RtioPipe for FileDesc {
     fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         self.inner_write(buf)
     }
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
-        box FileDesc { inner: self.inner.clone() } as Box<rtio::RtioPipe:Send>
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
+        box FileDesc { inner: self.inner.clone() } as Box<rtio::RtioPipe + Send>
     }
 
     // Only supported on named pipes currently. Note that this doesn't have an
diff --git a/src/libnative/io/file_win32.rs b/src/libnative/io/file_win32.rs
index 5ace8e347c6..41ef5e31a91 100644
--- a/src/libnative/io/file_win32.rs
+++ b/src/libnative/io/file_win32.rs
@@ -201,8 +201,8 @@ impl rtio::RtioPipe for FileDesc {
     fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         self.inner_write(buf)
     }
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
-        box FileDesc { inner: self.inner.clone() } as Box<rtio::RtioPipe:Send>
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
+        box FileDesc { inner: self.inner.clone() } as Box<rtio::RtioPipe + Send>
     }
 
     // Only supported on named pipes currently. Note that this doesn't have an
diff --git a/src/libnative/io/mod.rs b/src/libnative/io/mod.rs
index 6dc2482ab0c..32775e2cfb5 100644
--- a/src/libnative/io/mod.rs
+++ b/src/libnative/io/mod.rs
@@ -167,34 +167,34 @@ impl rtio::IoFactory for IoFactory {
     // networking
     fn tcp_connect(&mut self, addr: rtio::SocketAddr,
                    timeout: Option<u64>)
-        -> IoResult<Box<rtio::RtioTcpStream:Send>>
+        -> IoResult<Box<rtio::RtioTcpStream + Send>>
     {
         net::TcpStream::connect(addr, timeout).map(|s| {
-            box s as Box<rtio::RtioTcpStream:Send>
+            box s as Box<rtio::RtioTcpStream + Send>
         })
     }
     fn tcp_bind(&mut self, addr: rtio::SocketAddr)
-                -> IoResult<Box<rtio::RtioTcpListener:Send>> {
+                -> IoResult<Box<rtio::RtioTcpListener + Send>> {
         net::TcpListener::bind(addr).map(|s| {
-            box s as Box<rtio::RtioTcpListener:Send>
+            box s as Box<rtio::RtioTcpListener + Send>
         })
     }
     fn udp_bind(&mut self, addr: rtio::SocketAddr)
-                -> IoResult<Box<rtio::RtioUdpSocket:Send>> {
+                -> IoResult<Box<rtio::RtioUdpSocket + Send>> {
         net::UdpSocket::bind(addr).map(|u| {
-            box u as Box<rtio::RtioUdpSocket:Send>
+            box u as Box<rtio::RtioUdpSocket + Send>
         })
     }
     fn unix_bind(&mut self, path: &CString)
-                 -> IoResult<Box<rtio::RtioUnixListener:Send>> {
+                 -> IoResult<Box<rtio::RtioUnixListener + Send>> {
         pipe::UnixListener::bind(path).map(|s| {
-            box s as Box<rtio::RtioUnixListener:Send>
+            box s as Box<rtio::RtioUnixListener + Send>
         })
     }
     fn unix_connect(&mut self, path: &CString,
-                    timeout: Option<u64>) -> IoResult<Box<rtio::RtioPipe:Send>> {
+                    timeout: Option<u64>) -> IoResult<Box<rtio::RtioPipe + Send>> {
         pipe::UnixStream::connect(path, timeout).map(|s| {
-            box s as Box<rtio::RtioPipe:Send>
+            box s as Box<rtio::RtioPipe + Send>
         })
     }
     fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
@@ -206,18 +206,18 @@ impl rtio::IoFactory for IoFactory {
 
     // filesystem operations
     fn fs_from_raw_fd(&mut self, fd: c_int, close: rtio::CloseBehavior)
-                      -> Box<rtio::RtioFileStream:Send> {
+                      -> Box<rtio::RtioFileStream + Send> {
         let close = match close {
             rtio::CloseSynchronously | rtio::CloseAsynchronously => true,
             rtio::DontClose => false
         };
-        box file::FileDesc::new(fd, close) as Box<rtio::RtioFileStream:Send>
+        box file::FileDesc::new(fd, close) as Box<rtio::RtioFileStream + Send>
     }
     fn fs_open(&mut self, path: &CString, fm: rtio::FileMode,
                fa: rtio::FileAccess)
-        -> IoResult<Box<rtio::RtioFileStream:Send>>
+        -> IoResult<Box<rtio::RtioFileStream + Send>>
     {
-        file::open(path, fm, fa).map(|fd| box fd as Box<rtio::RtioFileStream:Send>)
+        file::open(path, fm, fa).map(|fd| box fd as Box<rtio::RtioFileStream + Send>)
     }
     fn fs_unlink(&mut self, path: &CString) -> IoResult<()> {
         file::unlink(path)
@@ -261,31 +261,31 @@ impl rtio::IoFactory for IoFactory {
     }
 
     // misc
-    fn timer_init(&mut self) -> IoResult<Box<rtio::RtioTimer:Send>> {
-        timer::Timer::new().map(|t| box t as Box<rtio::RtioTimer:Send>)
+    fn timer_init(&mut self) -> IoResult<Box<rtio::RtioTimer + Send>> {
+        timer::Timer::new().map(|t| box t as Box<rtio::RtioTimer + Send>)
     }
     fn spawn(&mut self, cfg: rtio::ProcessConfig)
-            -> IoResult<(Box<rtio::RtioProcess:Send>,
-                         Vec<Option<Box<rtio::RtioPipe:Send>>>)> {
+            -> IoResult<(Box<rtio::RtioProcess + Send>,
+                         Vec<Option<Box<rtio::RtioPipe + Send>>>)> {
         process::Process::spawn(cfg).map(|(p, io)| {
-            (box p as Box<rtio::RtioProcess:Send>,
+            (box p as Box<rtio::RtioProcess + Send>,
              io.move_iter().map(|p| p.map(|p| {
-                 box p as Box<rtio::RtioPipe:Send>
+                 box p as Box<rtio::RtioPipe + Send>
              })).collect())
         })
     }
     fn kill(&mut self, pid: libc::pid_t, signum: int) -> IoResult<()> {
         process::Process::kill(pid, signum)
     }
-    fn pipe_open(&mut self, fd: c_int) -> IoResult<Box<rtio::RtioPipe:Send>> {
-        Ok(box file::FileDesc::new(fd, true) as Box<rtio::RtioPipe:Send>)
+    fn pipe_open(&mut self, fd: c_int) -> IoResult<Box<rtio::RtioPipe + Send>> {
+        Ok(box file::FileDesc::new(fd, true) as Box<rtio::RtioPipe + Send>)
     }
     fn tty_open(&mut self, fd: c_int, _readable: bool)
-                -> IoResult<Box<rtio::RtioTTY:Send>> {
+                -> IoResult<Box<rtio::RtioTTY + Send>> {
         #[cfg(unix)] use ERROR = libc::ENOTTY;
         #[cfg(windows)] use ERROR = libc::ERROR_INVALID_HANDLE;
         if unsafe { libc::isatty(fd) } != 0 {
-            Ok(box file::FileDesc::new(fd, true) as Box<rtio::RtioTTY:Send>)
+            Ok(box file::FileDesc::new(fd, true) as Box<rtio::RtioTTY + Send>)
         } else {
             Err(IoError {
                 code: ERROR as uint,
@@ -295,7 +295,7 @@ impl rtio::IoFactory for IoFactory {
         }
     }
     fn signal(&mut self, _signal: int, _cb: Box<rtio::Callback>)
-              -> IoResult<Box<rtio::RtioSignal:Send>> {
+              -> IoResult<Box<rtio::RtioSignal + Send>> {
         Err(unimpl())
     }
 }
diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs
index 2694c932b95..8cf0c3bf062 100644
--- a/src/libnative/io/net.rs
+++ b/src/libnative/io/net.rs
@@ -397,12 +397,12 @@ impl rtio::RtioTcpStream for TcpStream {
         self.set_keepalive(None)
     }
 
-    fn clone(&self) -> Box<rtio::RtioTcpStream:Send> {
+    fn clone(&self) -> Box<rtio::RtioTcpStream + Send> {
         box TcpStream {
             inner: self.inner.clone(),
             read_deadline: 0,
             write_deadline: 0,
-        } as Box<rtio::RtioTcpStream:Send>
+        } as Box<rtio::RtioTcpStream + Send>
     }
 
     fn close_write(&mut self) -> IoResult<()> {
@@ -484,9 +484,9 @@ impl TcpListener {
 }
 
 impl rtio::RtioTcpListener for TcpListener {
-    fn listen(~self) -> IoResult<Box<rtio::RtioTcpAcceptor:Send>> {
+    fn listen(~self) -> IoResult<Box<rtio::RtioTcpAcceptor + Send>> {
         self.native_listen(128).map(|a| {
-            box a as Box<rtio::RtioTcpAcceptor:Send>
+            box a as Box<rtio::RtioTcpAcceptor + Send>
         })
     }
 }
@@ -533,8 +533,8 @@ impl rtio::RtioSocket for TcpAcceptor {
 }
 
 impl rtio::RtioTcpAcceptor for TcpAcceptor {
-    fn accept(&mut self) -> IoResult<Box<rtio::RtioTcpStream:Send>> {
-        self.native_accept().map(|s| box s as Box<rtio::RtioTcpStream:Send>)
+    fn accept(&mut self) -> IoResult<Box<rtio::RtioTcpStream + Send>> {
+        self.native_accept().map(|s| box s as Box<rtio::RtioTcpStream + Send>)
     }
 
     fn accept_simultaneously(&mut self) -> IoResult<()> { Ok(()) }
@@ -720,12 +720,12 @@ impl rtio::RtioUdpSocket for UdpSocket {
         self.set_broadcast(false)
     }
 
-    fn clone(&self) -> Box<rtio::RtioUdpSocket:Send> {
+    fn clone(&self) -> Box<rtio::RtioUdpSocket + Send> {
         box UdpSocket {
             inner: self.inner.clone(),
             read_deadline: 0,
             write_deadline: 0,
-        } as Box<rtio::RtioUdpSocket:Send>
+        } as Box<rtio::RtioUdpSocket + Send>
     }
 
     fn set_timeout(&mut self, timeout: Option<u64>) {
diff --git a/src/libnative/io/pipe_unix.rs b/src/libnative/io/pipe_unix.rs
index 1458b475ae9..db0d1743c72 100644
--- a/src/libnative/io/pipe_unix.rs
+++ b/src/libnative/io/pipe_unix.rs
@@ -179,8 +179,8 @@ impl rtio::RtioPipe for UnixStream {
         }
     }
 
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
-        box UnixStream::new(self.inner.clone()) as Box<rtio::RtioPipe:Send>
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
+        box UnixStream::new(self.inner.clone()) as Box<rtio::RtioPipe + Send>
     }
 
     fn close_write(&mut self) -> IoResult<()> {
@@ -229,9 +229,9 @@ impl UnixListener {
 }
 
 impl rtio::RtioUnixListener for UnixListener {
-    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor:Send>> {
+    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor + Send>> {
         self.native_listen(128).map(|a| {
-            box a as Box<rtio::RtioUnixAcceptor:Send>
+            box a as Box<rtio::RtioUnixAcceptor + Send>
         })
     }
 }
@@ -264,8 +264,8 @@ impl UnixAcceptor {
 }
 
 impl rtio::RtioUnixAcceptor for UnixAcceptor {
-    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe:Send>> {
-        self.native_accept().map(|s| box s as Box<rtio::RtioPipe:Send>)
+    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe + Send>> {
+        self.native_accept().map(|s| box s as Box<rtio::RtioPipe + Send>)
     }
     fn set_timeout(&mut self, timeout: Option<u64>) {
         self.deadline = timeout.map(|a| ::io::timer::now() + a).unwrap_or(0);
diff --git a/src/libnative/io/pipe_win32.rs b/src/libnative/io/pipe_win32.rs
index b097bde2ad8..5d9ddb1f59c 100644
--- a/src/libnative/io/pipe_win32.rs
+++ b/src/libnative/io/pipe_win32.rs
@@ -496,14 +496,14 @@ impl rtio::RtioPipe for UnixStream {
         Ok(())
     }
 
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
         box UnixStream {
             inner: self.inner.clone(),
             read: None,
             write: None,
             read_deadline: 0,
             write_deadline: 0,
-        } as Box<rtio::RtioPipe:Send>
+        } as Box<rtio::RtioPipe + Send>
     }
 
     fn close_read(&mut self) -> IoResult<()> {
@@ -588,9 +588,9 @@ impl Drop for UnixListener {
 }
 
 impl rtio::RtioUnixListener for UnixListener {
-    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor:Send>> {
+    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor + Send>> {
         self.native_listen().map(|a| {
-            box a as Box<rtio::RtioUnixAcceptor:Send>
+            box a as Box<rtio::RtioUnixAcceptor + Send>
         })
     }
 }
@@ -702,8 +702,8 @@ impl UnixAcceptor {
 }
 
 impl rtio::RtioUnixAcceptor for UnixAcceptor {
-    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe:Send>> {
-        self.native_accept().map(|s| box s as Box<rtio::RtioPipe:Send>)
+    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe + Send>> {
+        self.native_accept().map(|s| box s as Box<rtio::RtioPipe + Send>)
     }
     fn set_timeout(&mut self, timeout: Option<u64>) {
         self.deadline = timeout.map(|i| i + ::io::timer::now()).unwrap_or(0);
diff --git a/src/libnative/io/timer_unix.rs b/src/libnative/io/timer_unix.rs
index ca0a810890c..304ff973835 100644
--- a/src/libnative/io/timer_unix.rs
+++ b/src/libnative/io/timer_unix.rs
@@ -67,7 +67,7 @@ pub struct Timer {
 }
 
 struct Inner {
-    cb: Option<Box<rtio::Callback:Send>>,
+    cb: Option<Box<rtio::Callback + Send>>,
     interval: u64,
     repeat: bool,
     target: u64,
@@ -266,7 +266,7 @@ impl rtio::RtioTimer for Timer {
         Timer::sleep(msecs);
     }
 
-    fn oneshot(&mut self, msecs: u64, cb: Box<rtio::Callback:Send>) {
+    fn oneshot(&mut self, msecs: u64, cb: Box<rtio::Callback + Send>) {
         let now = now();
         let mut inner = self.inner();
 
@@ -278,7 +278,7 @@ impl rtio::RtioTimer for Timer {
         unsafe { HELPER.send(NewTimer(inner)); }
     }
 
-    fn period(&mut self, msecs: u64, cb: Box<rtio::Callback:Send>) {
+    fn period(&mut self, msecs: u64, cb: Box<rtio::Callback + Send>) {
         let now = now();
         let mut inner = self.inner();
 
diff --git a/src/libnative/io/timer_win32.rs b/src/libnative/io/timer_win32.rs
index d175060dd98..9be09c6de07 100644
--- a/src/libnative/io/timer_win32.rs
+++ b/src/libnative/io/timer_win32.rs
@@ -36,7 +36,7 @@ pub struct Timer {
 }
 
 pub enum Req {
-    NewTimer(libc::HANDLE, Box<Callback:Send>, bool),
+    NewTimer(libc::HANDLE, Box<Callback + Send>, bool),
     RemoveTimer(libc::HANDLE, Sender<()>),
 }
 
@@ -148,7 +148,7 @@ impl rtio::RtioTimer for Timer {
         let _ = unsafe { imp::WaitForSingleObject(self.obj, libc::INFINITE) };
     }
 
-    fn oneshot(&mut self, msecs: u64, cb: Box<Callback:Send>) {
+    fn oneshot(&mut self, msecs: u64, cb: Box<Callback + Send>) {
         self.remove();
 
         // see above for the calculation
@@ -162,7 +162,7 @@ impl rtio::RtioTimer for Timer {
         self.on_worker = true;
     }
 
-    fn period(&mut self, msecs: u64, cb: Box<Callback:Send>) {
+    fn period(&mut self, msecs: u64, cb: Box<Callback + Send>) {
         self.remove();
 
         // see above for the calculation