Skip to content

Commit d9563a5

Browse files
authored
Rollup merge of #129121 - devnexen:stabilize_ext_linux_tcp_layer, r=tgross35
Stabilize `tcp_quickack` to stabilise the quickack part for now, tcp_deferaccept had been added at a later stage. The related API calls are the following ```rust // std::os::linux::net // sealed trait, implemented for std::net::TcpStream pub trait TcpStreamExt: Sealed{ fn quickack(&self) -> io::Result<bool>; fn set_quickack(&self, quickack: bool) -> io::Result<()>; } ``` Closes: #96256
2 parents b6685d7 + 1666f86 commit d9563a5

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

library/std/src/os/android/net.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
pub use crate::os::net::linux_ext::addr::SocketAddrExt;
77
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
88
pub use crate::os::net::linux_ext::socket::UnixSocketExt;
9-
#[unstable(feature = "tcp_quickack", issue = "96256")]
9+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
1010
pub use crate::os::net::linux_ext::tcp::TcpStreamExt;

library/std/src/os/linux/net.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
pub use crate::os::net::linux_ext::addr::SocketAddrExt;
77
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
88
pub use crate::os::net::linux_ext::socket::UnixSocketExt;
9-
#[unstable(feature = "tcp_quickack", issue = "96256")]
9+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
1010
pub use crate::os::net::linux_ext::tcp::TcpStreamExt;

library/std/src/os/net/linux_ext/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub(crate) mod addr;
88
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
99
pub(crate) mod socket;
1010

11-
#[unstable(feature = "tcp_quickack", issue = "96256")]
11+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
1212
pub(crate) mod tcp;
1313

1414
#[cfg(test)]

library/std/src/os/net/linux_ext/tcp.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::{io, net};
99
/// Os-specific extensions for [`TcpStream`]
1010
///
1111
/// [`TcpStream`]: net::TcpStream
12-
#[unstable(feature = "tcp_quickack", issue = "96256")]
12+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
1313
pub trait TcpStreamExt: Sealed {
1414
/// Enable or disable `TCP_QUICKACK`.
1515
///
@@ -23,7 +23,6 @@ pub trait TcpStreamExt: Sealed {
2323
/// # Examples
2424
///
2525
/// ```no_run
26-
/// #![feature(tcp_quickack)]
2726
/// use std::net::TcpStream;
2827
/// #[cfg(target_os = "linux")]
2928
/// use std::os::linux::net::TcpStreamExt;
@@ -34,7 +33,7 @@ pub trait TcpStreamExt: Sealed {
3433
/// .expect("Couldn't connect to the server...");
3534
/// stream.set_quickack(true).expect("set_quickack call failed");
3635
/// ```
37-
#[unstable(feature = "tcp_quickack", issue = "96256")]
36+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
3837
fn set_quickack(&self, quickack: bool) -> io::Result<()>;
3938

4039
/// Gets the value of the `TCP_QUICKACK` option on this socket.
@@ -44,7 +43,6 @@ pub trait TcpStreamExt: Sealed {
4443
/// # Examples
4544
///
4645
/// ```no_run
47-
/// #![feature(tcp_quickack)]
4846
/// use std::net::TcpStream;
4947
/// #[cfg(target_os = "linux")]
5048
/// use std::os::linux::net::TcpStreamExt;
@@ -56,7 +54,7 @@ pub trait TcpStreamExt: Sealed {
5654
/// stream.set_quickack(true).expect("set_quickack call failed");
5755
/// assert_eq!(stream.quickack().unwrap_or(false), true);
5856
/// ```
59-
#[unstable(feature = "tcp_quickack", issue = "96256")]
57+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
6058
fn quickack(&self) -> io::Result<bool>;
6159

6260
/// A socket listener will be awakened solely when data arrives.
@@ -105,10 +103,10 @@ pub trait TcpStreamExt: Sealed {
105103
fn deferaccept(&self) -> io::Result<u32>;
106104
}
107105

108-
#[unstable(feature = "tcp_quickack", issue = "96256")]
106+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
109107
impl Sealed for net::TcpStream {}
110108

111-
#[unstable(feature = "tcp_quickack", issue = "96256")]
109+
#[stable(feature = "tcp_quickack", since = "CURRENT_RUSTC_VERSION")]
112110
impl TcpStreamExt for net::TcpStream {
113111
fn set_quickack(&self, quickack: bool) -> io::Result<()> {
114112
self.as_inner().as_inner().set_quickack(quickack)

0 commit comments

Comments
 (0)