Skip to content

Commit 805c8c3

Browse files
committed
Unstable feature gate for std::net::hostname
1 parent 97ba15c commit 805c8c3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/std/src/net/hostname.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::os::raw::c_char;
88
/// The returned result will, on success, return the same result [`libc::gethostname`] would return
99
/// (as it is implemented using the very same function), and on error, what `errno` contains, also
1010
/// set by [`libc::gethostname`].
11-
#[stable(feature = "rust1", since = "1.84.0")]
11+
#[unstable(feature = "gethostname", issue = "135142")]
1212
pub fn hostname() -> std::io::Result<OsString> {
1313
// 255 bytes is the maximum allowable length for a hostname (as per the DNS spec),
1414
// so we shouldn't ever have problems with this. I (@orowith2os) considered using a constant

library/std/src/net/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub use self::tcp::{Incoming, TcpListener, TcpStream};
3636
#[stable(feature = "rust1", since = "1.0.0")]
3737
pub use self::udp::UdpSocket;
3838
use crate::io::{self, ErrorKind};
39-
#[stable(feature = "rust1", since = "1.84.0")]
39+
#[unstable(feature = "gethostname", issue = "135142")]
4040
pub use self::hostname::hostname;
4141

4242
mod ip_addr;

0 commit comments

Comments
 (0)