Skip to content

Commit 377b1ad

Browse files
committed
std: Rename sys::foo2 modules to sys::foo
Now that `std::old_io` has been removed for quite some time the naming real estate here has opened up to allow these modules to move back to their proper names.
1 parent 05d5fca commit 377b1ad

File tree

29 files changed

+47
-47
lines changed

29 files changed

+47
-47
lines changed

src/libstd/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use fmt;
2323
use ffi::OsString;
2424
use io::{self, Error, ErrorKind, SeekFrom, Seek, Read, Write};
2525
use path::{Path, PathBuf};
26-
use sys::fs2 as fs_imp;
26+
use sys::fs as fs_imp;
2727
use sys_common::{AsInnerMut, FromInner, AsInner};
2828
use vec::Vec;
2929

src/libstd/net/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use prelude::v1::*;
1616

1717
use io::{self, Error, ErrorKind};
18-
use sys_common::net2 as net_imp;
18+
use sys_common::net as net_imp;
1919

2020
pub use self::ip::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope};
2121
pub use self::addr::{SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs};

src/libstd/net/tcp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use io::prelude::*;
1717
use fmt;
1818
use io;
1919
use net::{ToSocketAddrs, SocketAddr, Shutdown};
20-
use sys_common::net2 as net_imp;
20+
use sys_common::net as net_imp;
2121
use sys_common::{AsInner, FromInner};
2222

2323
/// A structure which represents a TCP stream between a local socket and a

src/libstd/net/udp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use prelude::v1::*;
1616
use fmt;
1717
use io::{self, Error, ErrorKind};
1818
use net::{ToSocketAddrs, SocketAddr, IpAddr};
19-
use sys_common::net2 as net_imp;
19+
use sys_common::net as net_imp;
2020
use sys_common::{AsInner, FromInner};
2121

2222
/// A User Datagram Protocol socket.

src/libstd/os/android/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
pub mod raw;
1616

1717
pub mod fs {
18-
pub use sys::fs2::MetadataExt;
18+
pub use sys::fs::MetadataExt;
1919
}

src/libstd/os/bitrig/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
pub mod raw;
1616

1717
pub mod fs {
18-
pub use sys::fs2::MetadataExt;
18+
pub use sys::fs::MetadataExt;
1919
}

src/libstd/os/dragonfly/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
pub mod raw;
1616

1717
pub mod fs {
18-
pub use sys::fs2::MetadataExt;
18+
pub use sys::fs::MetadataExt;
1919
}

src/libstd/os/freebsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
pub mod raw;
1616

1717
pub mod fs {
18-
pub use sys::fs2::MetadataExt;
18+
pub use sys::fs::MetadataExt;
1919
}

src/libstd/os/ios/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
pub mod raw;
1616

1717
pub mod fs {
18-
pub use sys::fs2::MetadataExt;
18+
pub use sys::fs::MetadataExt;
1919
}

src/libstd/os/linux/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
pub mod raw;
1616

1717
pub mod fs {
18-
pub use sys::fs2::MetadataExt;
18+
pub use sys::fs::MetadataExt;
1919
}

src/libstd/os/macos/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
pub mod raw;
1616

1717
pub mod fs {
18-
pub use sys::fs2::MetadataExt;
18+
pub use sys::fs::MetadataExt;
1919
}

src/libstd/os/nacl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
pub mod raw;
1616

1717
pub mod fs {
18-
pub use sys::fs2::MetadataExt;
18+
pub use sys::fs::MetadataExt;
1919
}

src/libstd/os/openbsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
pub mod raw;
1616

1717
pub mod fs {
18-
pub use sys::fs2::MetadataExt;
18+
pub use sys::fs::MetadataExt;
1919
}

src/libstd/process.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ use fmt;
2121
use io::{self, Error, ErrorKind};
2222
use path;
2323
use sync::mpsc::{channel, Receiver};
24-
use sys::pipe2::{self, AnonPipe};
25-
use sys::process2::Command as CommandImp;
26-
use sys::process2::Process as ProcessImp;
27-
use sys::process2::ExitStatus as ExitStatusImp;
28-
use sys::process2::Stdio as StdioImp2;
24+
use sys::pipe::{self, AnonPipe};
25+
use sys::process::Command as CommandImp;
26+
use sys::process::Process as ProcessImp;
27+
use sys::process::ExitStatus as ExitStatusImp;
28+
use sys::process::Stdio as StdioImp2;
2929
use sys_common::{AsInner, AsInnerMut};
3030
use thread;
3131

@@ -334,7 +334,7 @@ fn setup_io(io: &StdioImp, readable: bool)
334334
Null => (StdioImp2::None, None),
335335
Inherit => (StdioImp2::Inherit, None),
336336
Piped => {
337-
let (reader, writer) = try!(pipe2::anon_pipe());
337+
let (reader, writer) = try!(pipe::anon_pipe());
338338
if readable {
339339
(StdioImp2::Piped(reader), Some(writer))
340340
} else {

src/libstd/sys/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use prelude::v1::*;
1515
pub mod backtrace;
1616
pub mod condvar;
1717
pub mod mutex;
18-
pub mod net2;
18+
pub mod net;
1919
pub mod poison;
2020
pub mod remutex;
2121
pub mod rwlock;
File renamed without changes.

src/libstd/sys/unix/ext/fs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl OpenOptionsExt for OpenOptions {
102102
}
103103

104104
#[unstable(feature = "metadata_ext", reason = "recently added API")]
105-
pub struct Metadata(sys::fs2::FileAttr);
105+
pub struct Metadata(sys::fs::FileAttr);
106106

107107
#[unstable(feature = "metadata_ext", reason = "recently added API")]
108108
pub trait MetadataExt {
@@ -111,7 +111,7 @@ pub trait MetadataExt {
111111

112112
impl MetadataExt for fs::Metadata {
113113
fn as_raw(&self) -> &Metadata {
114-
let inner: &sys::fs2::FileAttr = self.as_inner();
114+
let inner: &sys::fs::FileAttr = self.as_inner();
115115
unsafe { mem::transmute(inner) }
116116
}
117117
}
@@ -187,7 +187,7 @@ impl DirEntryExt for fs::DirEntry {
187187
#[stable(feature = "rust1", since = "1.0.0")]
188188
pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<()>
189189
{
190-
sys::fs2::symlink(src.as_ref(), dst.as_ref())
190+
sys::fs::symlink(src.as_ref(), dst.as_ref())
191191
}
192192

193193
#[unstable(feature = "dir_builder", reason = "recently added API")]

src/libstd/sys/unix/ext/io.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use fs;
1616
use net;
1717
use os::raw;
1818
use sys;
19-
use sys_common::{net2, AsInner, FromInner};
19+
use sys_common::{self, AsInner, FromInner};
2020

2121
/// Raw file descriptors.
2222
#[stable(feature = "rust1", since = "1.0.0")]
@@ -68,7 +68,7 @@ impl AsRawFd for fs::File {
6868
#[stable(feature = "from_raw_os", since = "1.1.0")]
6969
impl FromRawFd for fs::File {
7070
unsafe fn from_raw_fd(fd: RawFd) -> fs::File {
71-
fs::File::from_inner(sys::fs2::File::from_inner(fd))
71+
fs::File::from_inner(sys::fs::File::from_inner(fd))
7272
}
7373
}
7474

@@ -89,20 +89,20 @@ impl AsRawFd for net::UdpSocket {
8989
impl FromRawFd for net::TcpStream {
9090
unsafe fn from_raw_fd(fd: RawFd) -> net::TcpStream {
9191
let socket = sys::net::Socket::from_inner(fd);
92-
net::TcpStream::from_inner(net2::TcpStream::from_inner(socket))
92+
net::TcpStream::from_inner(sys_common::net::TcpStream::from_inner(socket))
9393
}
9494
}
9595
#[stable(feature = "from_raw_os", since = "1.1.0")]
9696
impl FromRawFd for net::TcpListener {
9797
unsafe fn from_raw_fd(fd: RawFd) -> net::TcpListener {
9898
let socket = sys::net::Socket::from_inner(fd);
99-
net::TcpListener::from_inner(net2::TcpListener::from_inner(socket))
99+
net::TcpListener::from_inner(sys_common::net::TcpListener::from_inner(socket))
100100
}
101101
}
102102
#[stable(feature = "from_raw_os", since = "1.1.0")]
103103
impl FromRawFd for net::UdpSocket {
104104
unsafe fn from_raw_fd(fd: RawFd) -> net::UdpSocket {
105105
let socket = sys::net::Socket::from_inner(fd);
106-
net::UdpSocket::from_inner(net2::UdpSocket::from_inner(socket))
106+
net::UdpSocket::from_inner(sys_common::net::UdpSocket::from_inner(socket))
107107
}
108108
}

src/libstd/sys/unix/ext/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub trait ExitStatusExt {
5858
impl ExitStatusExt for process::ExitStatus {
5959
fn signal(&self) -> Option<i32> {
6060
match *self.as_inner() {
61-
sys::process2::ExitStatus::Signal(s) => Some(s),
61+
sys::process::ExitStatus::Signal(s) => Some(s),
6262
_ => None
6363
}
6464
}
File renamed without changes.

src/libstd/sys/unix/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ pub mod c;
3333
pub mod condvar;
3434
pub mod ext;
3535
pub mod fd;
36-
pub mod fs2;
36+
pub mod fs;
3737
pub mod mutex;
3838
pub mod net;
3939
pub mod os;
4040
pub mod os_str;
41-
pub mod pipe2;
42-
pub mod process2;
41+
pub mod pipe;
42+
pub mod process;
4343
pub mod rwlock;
4444
pub mod stack_overflow;
4545
pub mod sync;
File renamed without changes.

src/libstd/sys/unix/process2.rs renamed to src/libstd/sys/unix/process.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ use fmt;
1818
use io::{self, Error, ErrorKind};
1919
use libc::{self, pid_t, c_void, c_int, gid_t, uid_t};
2020
use ptr;
21-
use sys::pipe2::AnonPipe;
21+
use sys::pipe::AnonPipe;
2222
use sys::{self, c, cvt, cvt_r};
23-
use sys::fs2::{File, OpenOptions};
23+
use sys::fs::{File, OpenOptions};
2424

2525
////////////////////////////////////////////////////////////////////////////////
2626
// Command
@@ -141,7 +141,7 @@ impl Process {
141141

142142
let (envp, _a, _b) = make_envp(cfg.env.as_ref());
143143
let (argv, _a) = make_argv(&cfg.program, &cfg.args);
144-
let (input, output) = try!(sys::pipe2::anon_pipe());
144+
let (input, output) = try!(sys::pipe::anon_pipe());
145145

146146
let pid = unsafe {
147147
match libc::fork() {

src/libstd/sys/windows/ext/fs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl MetadataExt for Metadata {
125125
#[stable(feature = "rust1", since = "1.0.0")]
126126
pub fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q)
127127
-> io::Result<()> {
128-
sys::fs2::symlink_inner(src.as_ref(), dst.as_ref(), false)
128+
sys::fs::symlink_inner(src.as_ref(), dst.as_ref(), false)
129129
}
130130

131131
/// Creates a new directory symlink on the filesystem.
@@ -146,5 +146,5 @@ pub fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q)
146146
#[stable(feature = "rust1", since = "1.0.0")]
147147
pub fn symlink_dir<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q)
148148
-> io::Result<()> {
149-
sys::fs2::symlink_inner(src.as_ref(), dst.as_ref(), true)
149+
sys::fs::symlink_inner(src.as_ref(), dst.as_ref(), true)
150150
}

src/libstd/sys/windows/ext/io.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use fs;
1414
use os::windows::raw;
1515
use net;
16-
use sys_common::{net2, AsInner, FromInner};
16+
use sys_common::{self, AsInner, FromInner};
1717
use sys;
1818

1919
/// Raw HANDLEs.
@@ -61,7 +61,7 @@ impl AsRawHandle for fs::File {
6161
impl FromRawHandle for fs::File {
6262
unsafe fn from_raw_handle(handle: RawHandle) -> fs::File {
6363
let handle = handle as ::libc::HANDLE;
64-
fs::File::from_inner(sys::fs2::File::from_inner(handle))
64+
fs::File::from_inner(sys::fs::File::from_inner(handle))
6565
}
6666
}
6767

@@ -113,20 +113,20 @@ impl AsRawSocket for net::UdpSocket {
113113
impl FromRawSocket for net::TcpStream {
114114
unsafe fn from_raw_socket(sock: RawSocket) -> net::TcpStream {
115115
let sock = sys::net::Socket::from_inner(sock);
116-
net::TcpStream::from_inner(net2::TcpStream::from_inner(sock))
116+
net::TcpStream::from_inner(sys_common::net::TcpStream::from_inner(sock))
117117
}
118118
}
119119
#[stable(feature = "from_raw_os", since = "1.1.0")]
120120
impl FromRawSocket for net::TcpListener {
121121
unsafe fn from_raw_socket(sock: RawSocket) -> net::TcpListener {
122122
let sock = sys::net::Socket::from_inner(sock);
123-
net::TcpListener::from_inner(net2::TcpListener::from_inner(sock))
123+
net::TcpListener::from_inner(sys_common::net::TcpListener::from_inner(sock))
124124
}
125125
}
126126
#[stable(feature = "from_raw_os", since = "1.1.0")]
127127
impl FromRawSocket for net::UdpSocket {
128128
unsafe fn from_raw_socket(sock: RawSocket) -> net::UdpSocket {
129129
let sock = sys::net::Socket::from_inner(sock);
130-
net::UdpSocket::from_inner(net2::UdpSocket::from_inner(sock))
130+
net::UdpSocket::from_inner(sys_common::net::UdpSocket::from_inner(sock))
131131
}
132132
}
File renamed without changes.

src/libstd/sys/windows/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ pub mod backtrace;
2525
pub mod c;
2626
pub mod condvar;
2727
pub mod ext;
28-
pub mod fs2;
28+
pub mod fs;
2929
pub mod handle;
3030
pub mod mutex;
3131
pub mod net;
3232
pub mod os;
3333
pub mod os_str;
34-
pub mod pipe2;
35-
pub mod process2;
34+
pub mod pipe;
35+
pub mod process;
3636
pub mod rwlock;
3737
pub mod stack_overflow;
3838
pub mod sync;
File renamed without changes.

src/libstd/sys/windows/process2.rs renamed to src/libstd/sys/windows/process.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ use path::Path;
2626
use ptr;
2727
use sync::{StaticMutex, MUTEX_INIT};
2828
use sys::c;
29-
use sys::fs2::{OpenOptions, File};
29+
use sys::fs::{OpenOptions, File};
3030
use sys::handle::Handle;
31-
use sys::pipe2::AnonPipe;
31+
use sys::pipe::AnonPipe;
3232
use sys::stdio;
3333
use sys::{self, cvt};
3434
use sys_common::{AsInner, FromInner};

0 commit comments

Comments
 (0)