Skip to content

Commit 49a1528

Browse files
authored
Rollup merge of #109288 - jmillikin:linux-abstract-socket-addr, r=joshtriplett
Stabilise `unix_socket_abstract` Fixes #85410
2 parents 0aa0043 + a3f3db8 commit 49a1528

File tree

8 files changed

+15
-20
lines changed

8 files changed

+15
-20
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Android-specific networking functionality.
22
3-
#![unstable(feature = "tcp_quickack", issue = "96256")]
3+
#![stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
44

5-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
5+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
66
pub use crate::os::net::linux_ext::addr::SocketAddrExt;
77

88
#[unstable(feature = "tcp_quickack", issue = "96256")]

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Linux-specific networking functionality.
22
3-
#![unstable(feature = "tcp_quickack", issue = "96256")]
3+
#![stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
44

5-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
5+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
66
pub use crate::os::net::linux_ext::addr::SocketAddrExt;
77

88
#[unstable(feature = "tcp_quickack", issue = "96256")]

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::os::unix::net::SocketAddr;
44
use crate::sealed::Sealed;
55

66
/// Platform-specific extensions to [`SocketAddr`].
7-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
7+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
88
pub trait SocketAddrExt: Sealed {
99
/// Creates a Unix socket address in the abstract namespace.
1010
///
@@ -22,7 +22,6 @@ pub trait SocketAddrExt: Sealed {
2222
/// # Examples
2323
///
2424
/// ```no_run
25-
/// #![feature(unix_socket_abstract)]
2625
/// use std::os::unix::net::{UnixListener, SocketAddr};
2726
/// use std::os::linux::net::SocketAddrExt;
2827
///
@@ -38,6 +37,7 @@ pub trait SocketAddrExt: Sealed {
3837
/// Ok(())
3938
/// }
4039
/// ```
40+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
4141
fn from_abstract_name<N>(name: N) -> crate::io::Result<SocketAddr>
4242
where
4343
N: AsRef<[u8]>;
@@ -47,7 +47,6 @@ pub trait SocketAddrExt: Sealed {
4747
/// # Examples
4848
///
4949
/// ```no_run
50-
/// #![feature(unix_socket_abstract)]
5150
/// use std::os::unix::net::{UnixListener, SocketAddr};
5251
/// use std::os::linux::net::SocketAddrExt;
5352
///
@@ -60,5 +59,6 @@ pub trait SocketAddrExt: Sealed {
6059
/// Ok(())
6160
/// }
6261
/// ```
62+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
6363
fn as_abstract_name(&self) -> Option<&[u8]>;
6464
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
#![doc(cfg(any(target_os = "linux", target_os = "android")))]
44

5-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
5+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
66
pub(crate) mod addr;
77

88
#[unstable(feature = "tcp_quickack", issue = "96256")]

library/std/src/os/unix/net/addr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,12 @@ impl SocketAddr {
245245
}
246246
}
247247

248-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
248+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
249249
impl Sealed for SocketAddr {}
250250

251251
#[doc(cfg(any(target_os = "android", target_os = "linux")))]
252252
#[cfg(any(doc, target_os = "android", target_os = "linux"))]
253-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
253+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
254254
impl linux_ext::addr::SocketAddrExt for SocketAddr {
255255
fn as_abstract_name(&self) -> Option<&[u8]> {
256256
if let AddressKind::Abstract(name) = self.address() { Some(name) } else { None }

library/std/src/os/unix/net/datagram.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ impl UnixDatagram {
102102
/// # Examples
103103
///
104104
/// ```no_run
105-
/// #![feature(unix_socket_abstract)]
106105
/// use std::os::unix::net::{UnixDatagram};
107106
///
108107
/// fn main() -> std::io::Result<()> {
@@ -119,7 +118,7 @@ impl UnixDatagram {
119118
/// Ok(())
120119
/// }
121120
/// ```
122-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
121+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
123122
pub fn bind_addr(socket_addr: &SocketAddr) -> io::Result<UnixDatagram> {
124123
unsafe {
125124
let socket = UnixDatagram::unbound()?;
@@ -217,7 +216,6 @@ impl UnixDatagram {
217216
/// # Examples
218217
///
219218
/// ```no_run
220-
/// #![feature(unix_socket_abstract)]
221219
/// use std::os::unix::net::{UnixDatagram};
222220
///
223221
/// fn main() -> std::io::Result<()> {
@@ -235,7 +233,7 @@ impl UnixDatagram {
235233
/// Ok(())
236234
/// }
237235
/// ```
238-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
236+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
239237
pub fn connect_addr(&self, socket_addr: &SocketAddr) -> io::Result<()> {
240238
unsafe {
241239
cvt(libc::connect(
@@ -523,7 +521,6 @@ impl UnixDatagram {
523521
/// # Examples
524522
///
525523
/// ```no_run
526-
/// #![feature(unix_socket_abstract)]
527524
/// use std::os::unix::net::{UnixDatagram};
528525
///
529526
/// fn main() -> std::io::Result<()> {
@@ -535,7 +532,7 @@ impl UnixDatagram {
535532
/// Ok(())
536533
/// }
537534
/// ```
538-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
535+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
539536
pub fn send_to_addr(&self, buf: &[u8], socket_addr: &SocketAddr) -> io::Result<usize> {
540537
unsafe {
541538
let count = cvt(libc::sendto(

library/std/src/os/unix/net/listener.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ impl UnixListener {
9090
/// # Examples
9191
///
9292
/// ```no_run
93-
/// #![feature(unix_socket_abstract)]
9493
/// use std::os::unix::net::{UnixListener};
9594
///
9695
/// fn main() -> std::io::Result<()> {
@@ -107,7 +106,7 @@ impl UnixListener {
107106
/// Ok(())
108107
/// }
109108
/// ```
110-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
109+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
111110
pub fn bind_addr(socket_addr: &SocketAddr) -> io::Result<UnixListener> {
112111
unsafe {
113112
let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;

library/std/src/os/unix/net/stream.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ impl UnixStream {
106106
/// # Examples
107107
///
108108
/// ```no_run
109-
/// #![feature(unix_socket_abstract)]
110109
/// use std::os::unix::net::{UnixListener, UnixStream};
111110
///
112111
/// fn main() -> std::io::Result<()> {
@@ -123,7 +122,7 @@ impl UnixStream {
123122
/// Ok(())
124123
/// }
125124
/// ````
126-
#[unstable(feature = "unix_socket_abstract", issue = "85410")]
125+
#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
127126
pub fn connect_addr(socket_addr: &SocketAddr) -> io::Result<UnixStream> {
128127
unsafe {
129128
let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;

0 commit comments

Comments
 (0)