File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ pub trait AsFd {
205
205
/// ```rust,no_run
206
206
/// use std::fs::File;
207
207
/// # use std::io;
208
+ /// # #[cfg(any(unix, target_os = "wasi"))]
208
209
/// # use std::os::fd::{AsFd, BorrowedFd};
209
210
///
210
211
/// let mut f = File::open("foo.txt")?;
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ pub trait AsRawFd {
42
42
/// ```no_run
43
43
/// use std::fs::File;
44
44
/// # use std::io;
45
+ /// #[cfg(any(unix, target_os = "wasi"))]
45
46
/// use std::os::fd::{AsRawFd, RawFd};
46
47
///
47
48
/// let mut f = File::open("foo.txt")?;
@@ -80,6 +81,7 @@ pub trait FromRawFd {
80
81
/// ```no_run
81
82
/// use std::fs::File;
82
83
/// # use std::io;
84
+ /// #[cfg(any(unix, target_os = "wasi"))]
83
85
/// use std::os::fd::{FromRawFd, IntoRawFd, RawFd};
84
86
///
85
87
/// let f = File::open("foo.txt")?;
@@ -115,6 +117,7 @@ pub trait IntoRawFd {
115
117
/// ```no_run
116
118
/// use std::fs::File;
117
119
/// # use std::io;
120
+ /// #[cfg(any(unix, target_os = "wasi"))]
118
121
/// use std::os::fd::{IntoRawFd, RawFd};
119
122
///
120
123
/// let f = File::open("foo.txt")?;
You can’t perform that action at this time.
0 commit comments