mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
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:
@@ -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;
|
||||
|
||||
@@ -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()`
|
||||
|
||||
Reference in New Issue
Block a user