diff options
| author | bors <bors@rust-lang.org> | 2015-04-15 01:05:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-15 01:05:03 +0000 |
| commit | 16e1fcead14628701e1b10b9d00c898d748db2ed (patch) | |
| tree | 37d18d85fa9631880c287c3795d5b4b3d8994f20 /src/libstd/sys/unix/ext.rs | |
| parent | 8415fa27877a4309a79b08c75a52eb4c3546b7a5 (diff) | |
| parent | e053571df21fda7bb909c1b79de9b0cbe1a2931d (diff) | |
| download | rust-16e1fcead14628701e1b10b9d00c898d748db2ed.tar.gz rust-16e1fcead14628701e1b10b9d00c898d748db2ed.zip | |
Auto merge of #24433 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/sys/unix/ext.rs')
| -rw-r--r-- | src/libstd/sys/unix/ext.rs | 91 |
1 files changed, 8 insertions, 83 deletions
diff --git a/src/libstd/sys/unix/ext.rs b/src/libstd/sys/unix/ext.rs index fa0f14b4807..032fd33b1d3 100644 --- a/src/libstd/sys/unix/ext.rs +++ b/src/libstd/sys/unix/ext.rs @@ -15,14 +15,12 @@ //! //! # Example //! -//! ```rust,ignore -//! #![feature(globs)] -//! -//! use std::old_io::fs::File; +//! ```no_run +//! use std::fs::File; //! use std::os::unix::prelude::*; //! //! fn main() { -//! let f = File::create(&Path::new("foo.txt")).unwrap(); +//! let f = File::create("foo.txt").unwrap(); //! let fd = f.as_raw_fd(); //! //! // use fd with native unix bindings @@ -34,7 +32,6 @@ /// Unix-specific extensions to general I/O primitives #[stable(feature = "rust1", since = "1.0.0")] pub mod io { - #[allow(deprecated)] use old_io; use fs; use libc; use net; @@ -53,7 +50,7 @@ pub mod io { /// and `AsRawSocket` set of traits. #[stable(feature = "rust1", since = "1.0.0")] pub trait AsRawFd { - /// Extract the raw file descriptor. + /// Extracts the raw file descriptor. /// /// This method does **not** pass ownership of the raw file descriptor /// to the caller. The descriptor is only guarantee to be valid while @@ -82,14 +79,6 @@ pub mod io { unsafe fn from_raw_fd(fd: RawFd) -> Self; } - #[allow(deprecated)] - #[stable(feature = "rust1", since = "1.0.0")] - impl AsRawFd for old_io::fs::File { - fn as_raw_fd(&self) -> RawFd { - self.as_inner().fd() - } - } - #[stable(feature = "rust1", since = "1.0.0")] impl AsRawFd for fs::File { fn as_raw_fd(&self) -> RawFd { @@ -103,70 +92,6 @@ pub mod io { } } - #[allow(deprecated)] - #[stable(feature = "rust1", since = "1.0.0")] - impl AsRawFd for old_io::pipe::PipeStream { - fn as_raw_fd(&self) -> RawFd { - self.as_inner().fd() - } - } - - #[allow(deprecated)] - #[stable(feature = "rust1", since = "1.0.0")] - impl AsRawFd for old_io::net::pipe::UnixStream { - fn as_raw_fd(&self) -> RawFd { - self.as_inner().fd() - } - } - - #[allow(deprecated)] - #[stable(feature = "rust1", since = "1.0.0")] - impl AsRawFd for old_io::net::pipe::UnixListener { - fn as_raw_fd(&self) -> RawFd { - self.as_inner().fd() - } - } - - #[allow(deprecated)] - #[stable(feature = "rust1", since = "1.0.0")] - impl AsRawFd for old_io::net::pipe::UnixAcceptor { - fn as_raw_fd(&self) -> RawFd { - self.as_inner().fd() - } - } - - #[stable(feature = "rust1", since = "1.0.0")] - #[allow(deprecated)] - impl AsRawFd for old_io::net::tcp::TcpStream { - fn as_raw_fd(&self) -> RawFd { - self.as_inner().fd() - } - } - - #[stable(feature = "rust1", since = "1.0.0")] - #[allow(deprecated)] - impl AsRawFd for old_io::net::tcp::TcpListener { - fn as_raw_fd(&self) -> RawFd { - self.as_inner().fd() - } - } - - #[stable(feature = "rust1", since = "1.0.0")] - #[allow(deprecated)] - impl AsRawFd for old_io::net::tcp::TcpAcceptor { - fn as_raw_fd(&self) -> RawFd { - self.as_inner().fd() - } - } - - #[allow(deprecated)] - #[stable(feature = "rust1", since = "1.0.0")] - impl AsRawFd for old_io::net::udp::UdpSocket { - fn as_raw_fd(&self) -> RawFd { - self.as_inner().fd() - } - } - #[stable(feature = "rust1", since = "1.0.0")] impl AsRawFd for net::TcpStream { fn as_raw_fd(&self) -> RawFd { *self.as_inner().socket().as_inner() } @@ -219,11 +144,11 @@ pub mod ffi { /// Unix-specific extensions to `OsString`. #[stable(feature = "rust1", since = "1.0.0")] pub trait OsStringExt { - /// Create an `OsString` from a byte vector. + /// Creates an `OsString` from a byte vector. #[stable(feature = "rust1", since = "1.0.0")] fn from_vec(vec: Vec<u8>) -> Self; - /// Yield the underlying byte vector of this `OsString`. + /// Yields the underlying byte vector of this `OsString`. #[stable(feature = "rust1", since = "1.0.0")] fn into_vec(self) -> Vec<u8>; } @@ -244,7 +169,7 @@ pub mod ffi { #[stable(feature = "rust1", since = "1.0.0")] fn from_bytes(slice: &[u8]) -> &Self; - /// Get the underlying byte view of the `OsStr` slice. + /// Gets the underlying byte view of the `OsStr` slice. #[stable(feature = "rust1", since = "1.0.0")] fn as_bytes(&self) -> &[u8]; } @@ -283,7 +208,7 @@ pub mod fs { /// Unix-specific extensions to `OpenOptions` pub trait OpenOptionsExt { - /// Set the mode bits that a new file will be created with. + /// Sets the mode bits that a new file will be created with. /// /// If a new file is created as part of a `File::open_opts` call then this /// specified `mode` will be used as the permission bits for the new file. |
