Skip to content

Commit ef03ff0

Browse files
committed
Stabilize from_raw_os feature in 1.0
1 parent 6cd7486 commit ef03ff0

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ pub trait AsRawFd {
4141

4242
/// A trait to express the ability to construct an object from a raw file
4343
/// descriptor.
44-
#[unstable(feature = "from_raw_os",
45-
reason = "recent addition to std::os::unix::io")]
44+
#[stable(feature = "rust1", since = "1.0.0")]
4645
pub trait FromRawFd {
4746
/// Constructs a new instances of `Self` from the given raw file
4847
/// descriptor.
@@ -65,7 +64,7 @@ impl AsRawFd for fs::File {
6564
self.as_inner().fd().raw()
6665
}
6766
}
68-
#[unstable(feature = "from_raw_os", reason = "trait is unstable")]
67+
#[stable(feature = "rust1", since = "1.0.0")]
6968
impl FromRawFd for fs::File {
7069
unsafe fn from_raw_fd(fd: RawFd) -> fs::File {
7170
fs::File::from_inner(sys::fs2::File::from_inner(fd))
@@ -85,21 +84,21 @@ impl AsRawFd for net::UdpSocket {
8584
fn as_raw_fd(&self) -> RawFd { *self.as_inner().socket().as_inner() }
8685
}
8786

88-
#[unstable(feature = "from_raw_os", reason = "trait is unstable")]
87+
#[stable(feature = "rust1", since = "1.0.0")]
8988
impl FromRawFd for net::TcpStream {
9089
unsafe fn from_raw_fd(fd: RawFd) -> net::TcpStream {
9190
let socket = sys::net::Socket::from_inner(fd);
9291
net::TcpStream::from_inner(net2::TcpStream::from_inner(socket))
9392
}
9493
}
95-
#[unstable(feature = "from_raw_os", reason = "trait is unstable")]
94+
#[stable(feature = "rust1", since = "1.0.0")]
9695
impl FromRawFd for net::TcpListener {
9796
unsafe fn from_raw_fd(fd: RawFd) -> net::TcpListener {
9897
let socket = sys::net::Socket::from_inner(fd);
9998
net::TcpListener::from_inner(net2::TcpListener::from_inner(socket))
10099
}
101100
}
102-
#[unstable(feature = "from_raw_os", reason = "trait is unstable")]
101+
#[stable(feature = "rust1", since = "1.0.0")]
103102
impl FromRawFd for net::UdpSocket {
104103
unsafe fn from_raw_fd(fd: RawFd) -> net::UdpSocket {
105104
let socket = sys::net::Socket::from_inner(fd);

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ pub trait AsRawHandle {
3333
}
3434

3535
/// Construct I/O objects from raw handles.
36-
#[unstable(feature = "from_raw_os",
37-
reason = "recent addition to the std::os::windows::io module")]
36+
#[stable(feature = "rust1", since = "1.0.0")]
3837
pub trait FromRawHandle {
3938
/// Constructs a new I/O object from the specified raw handle.
4039
///
@@ -57,7 +56,7 @@ impl AsRawHandle for fs::File {
5756
}
5857
}
5958

60-
#[unstable(feature = "from_raw_os", reason = "trait is unstable")]
59+
#[stable(feature = "rust1", since = "1.0.0")]
6160
impl FromRawHandle for fs::File {
6261
unsafe fn from_raw_handle(handle: RawHandle) -> fs::File {
6362
let handle = handle as ::libc::HANDLE;
@@ -74,7 +73,7 @@ pub trait AsRawSocket {
7473
}
7574

7675
/// Create I/O objects from raw sockets.
77-
#[unstable(feature = "from_raw_os", reason = "recent addition to module")]
76+
#[stable(feature = "rust1", since = "1.0.0")]
7877
pub trait FromRawSocket {
7978
/// Creates a new I/O object from the given raw socket.
8079
///
@@ -108,21 +107,21 @@ impl AsRawSocket for net::UdpSocket {
108107
}
109108
}
110109

111-
#[unstable(feature = "from_raw_os", reason = "trait is unstable")]
110+
#[stable(feature = "rust1", since = "1.0.0")]
112111
impl FromRawSocket for net::TcpStream {
113112
unsafe fn from_raw_socket(sock: RawSocket) -> net::TcpStream {
114113
let sock = sys::net::Socket::from_inner(sock);
115114
net::TcpStream::from_inner(net2::TcpStream::from_inner(sock))
116115
}
117116
}
118-
#[unstable(feature = "from_raw_os", reason = "trait is unstable")]
117+
#[stable(feature = "rust1", since = "1.0.0")]
119118
impl FromRawSocket for net::TcpListener {
120119
unsafe fn from_raw_socket(sock: RawSocket) -> net::TcpListener {
121120
let sock = sys::net::Socket::from_inner(sock);
122121
net::TcpListener::from_inner(net2::TcpListener::from_inner(sock))
123122
}
124123
}
125-
#[unstable(feature = "from_raw_os", reason = "trait is unstable")]
124+
#[stable(feature = "rust1", since = "1.0.0")]
126125
impl FromRawSocket for net::UdpSocket {
127126
unsafe fn from_raw_socket(sock: RawSocket) -> net::UdpSocket {
128127
let sock = sys::net::Socket::from_inner(sock);

0 commit comments

Comments
 (0)