Skip to content

Commit ab85165

Browse files
authored
Rollup merge of #94356 - Thomasdezeeuw:stabilize_unix_socket_creation, r=dtolnay
Rename unix::net::SocketAddr::from_path to from_pathname and stabilize it Stabilizes `unix_socket_creation`. Closes #93423 r? `@m-ou-se`
2 parents d58c69a + a84e77b commit ab85165

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

+4-6
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,11 @@ impl SocketAddr {
140140
/// # Examples
141141
///
142142
/// ```
143-
/// #![feature(unix_socket_creation)]
144143
/// use std::os::unix::net::SocketAddr;
145144
/// use std::path::Path;
146145
///
147146
/// # fn main() -> std::io::Result<()> {
148-
/// let address = SocketAddr::from_path("/path/to/socket")?;
147+
/// let address = SocketAddr::from_pathname("/path/to/socket")?;
149148
/// assert_eq!(address.as_pathname(), Some(Path::new("/path/to/socket")));
150149
/// # Ok(())
151150
/// # }
@@ -154,13 +153,12 @@ impl SocketAddr {
154153
/// Creating a `SocketAddr` with a NULL byte results in an error.
155154
///
156155
/// ```
157-
/// #![feature(unix_socket_creation)]
158156
/// use std::os::unix::net::SocketAddr;
159157
///
160-
/// assert!(SocketAddr::from_path("/path/with/\0/bytes").is_err());
158+
/// assert!(SocketAddr::from_pathname("/path/with/\0/bytes").is_err());
161159
/// ```
162-
#[unstable(feature = "unix_socket_creation", issue = "93423")]
163-
pub fn from_path<P>(path: P) -> io::Result<SocketAddr>
160+
#[stable(feature = "unix_socket_creation", since = "1.61.0")]
161+
pub fn from_pathname<P>(path: P) -> io::Result<SocketAddr>
164162
where
165163
P: AsRef<Path>,
166164
{

0 commit comments

Comments
 (0)