Rollup merge of #153774 - sardok:fix_sgx_std_doctest_build, r=WaffleLapkin

Fix std doctest build for SGX target.

This PR fixes standard library doctest build for `x86_64-fortanix-unknown-sgx` target.
This commit is contained in:
Stuart Cook
2026-03-14 17:30:24 +11:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
use crate::os::hermit::io::OwnedFd;
#[cfg(all(not(target_os = "hermit"), not(target_os = "motor")))]
use crate::os::raw;
#[cfg(all(doc, not(target_arch = "wasm32")))]
#[cfg(all(doc, not(any(target_arch = "wasm32", target_env = "sgx"))))]
use crate::os::unix::io::AsFd;
#[cfg(unix)]
use crate::os::unix::io::OwnedFd;
+2 -2
View File
@@ -68,8 +68,8 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
///
/// SGX doesn't support DNS resolution but rather accepts hostnames in
/// the same place as socket addresses. So, to make e.g.
/// ```rust
/// TcpStream::connect("example.com:80")`
/// ```rust,ignore (incomplete example)
/// TcpStream::connect("example.com:80")
/// ```
/// work, the DNS lookup returns a special error (`NonIpSockAddr`) instead,
/// which contains the hostname being looked up. When `.to_socket_addrs()`