Fix compilation of the doc tests on Windows.
This commit is contained in:
parent
7d80510c16
commit
a7f3ba9c13
2 changed files with 4 additions and 0 deletions
|
|
@ -205,6 +205,7 @@ pub trait AsFd {
|
|||
/// ```rust,no_run
|
||||
/// use std::fs::File;
|
||||
/// # use std::io;
|
||||
/// # #[cfg(any(unix, target_os = "wasi"))]
|
||||
/// # use std::os::fd::{AsFd, BorrowedFd};
|
||||
///
|
||||
/// let mut f = File::open("foo.txt")?;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ pub trait AsRawFd {
|
|||
/// ```no_run
|
||||
/// use std::fs::File;
|
||||
/// # use std::io;
|
||||
/// #[cfg(any(unix, target_os = "wasi"))]
|
||||
/// use std::os::fd::{AsRawFd, RawFd};
|
||||
///
|
||||
/// let mut f = File::open("foo.txt")?;
|
||||
|
|
@ -80,6 +81,7 @@ pub trait FromRawFd {
|
|||
/// ```no_run
|
||||
/// use std::fs::File;
|
||||
/// # use std::io;
|
||||
/// #[cfg(any(unix, target_os = "wasi"))]
|
||||
/// use std::os::fd::{FromRawFd, IntoRawFd, RawFd};
|
||||
///
|
||||
/// let f = File::open("foo.txt")?;
|
||||
|
|
@ -115,6 +117,7 @@ pub trait IntoRawFd {
|
|||
/// ```no_run
|
||||
/// use std::fs::File;
|
||||
/// # use std::io;
|
||||
/// #[cfg(any(unix, target_os = "wasi"))]
|
||||
/// use std::os::fd::{IntoRawFd, RawFd};
|
||||
///
|
||||
/// let f = File::open("foo.txt")?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue