diff options
| author | O01eg <o01eg@yandex.ru> | 2022-04-11 19:16:10 +0300 |
|---|---|---|
| committer | O01eg <o01eg@yandex.ru> | 2022-04-11 19:16:51 +0300 |
| commit | 3f4bbd50fda2be3ccf31031003bce19645afa99a (patch) | |
| tree | 9875a6310982822c4dbbb80ecfeb3dbf1873d22f /library/std/src | |
| parent | 43998d544108b613c4631ed60249880167e8aafc (diff) | |
| download | rust-3f4bbd50fda2be3ccf31031003bce19645afa99a.tar.gz rust-3f4bbd50fda2be3ccf31031003bce19645afa99a.zip | |
Fix documentation for wasm32-unknown-unknown
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/os/fd/owned.rs | 6 | ||||
| -rw-r--r-- | library/std/src/os/fd/raw.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/os/fd/owned.rs b/library/std/src/os/fd/owned.rs index 807b057234a..e6013c7c051 100644 --- a/library/std/src/os/fd/owned.rs +++ b/library/std/src/os/fd/owned.rs @@ -8,7 +8,7 @@ use crate::fmt; use crate::fs; use crate::marker::PhantomData; use crate::mem::forget; -#[cfg(not(any(target_os = "wasi", target_env = "sgx")))] +#[cfg(not(any(target_arch = "wasm32", target_env = "sgx")))] use crate::sys::cvt; use crate::sys_common::{AsInner, FromInner, IntoInner}; @@ -76,7 +76,7 @@ impl BorrowedFd<'_> { impl OwnedFd { /// Creates a new `OwnedFd` instance that shares the same underlying file handle /// as the existing `OwnedFd` instance. - #[cfg(not(target_os = "wasi"))] + #[cfg(not(target_arch = "wasm32"))] pub fn try_clone(&self) -> crate::io::Result<Self> { // We want to atomically duplicate this file descriptor and set the // CLOEXEC flag, and currently that's done via F_DUPFD_CLOEXEC. This @@ -95,7 +95,7 @@ impl OwnedFd { Ok(unsafe { Self::from_raw_fd(fd) }) } - #[cfg(target_os = "wasi")] + #[cfg(target_arch = "wasm32")] pub fn try_clone(&self) -> crate::io::Result<Self> { Err(crate::io::const_io_error!( crate::io::ErrorKind::Unsupported, diff --git a/library/std/src/os/fd/raw.rs b/library/std/src/os/fd/raw.rs index f9c883dd6bf..47ee88d97fb 100644 --- a/library/std/src/os/fd/raw.rs +++ b/library/std/src/os/fd/raw.rs @@ -5,7 +5,7 @@ use crate::fs; use crate::io; use crate::os::raw; -#[cfg(doc)] +#[cfg(all(doc, not(target_arch = "wasm32")))] use crate::os::unix::io::AsFd; #[cfg(unix)] use crate::os::unix::io::OwnedFd; |
