|
1 | 1 | use std::pin::Pin; |
2 | 2 | use std::sync::Mutex; |
3 | 3 | use std::future::Future; |
| 4 | +use std::io::Write as _; |
4 | 5 |
|
5 | 6 | use crate::io::{self, Write}; |
6 | 7 | use crate::task::{spawn_blocking, Context, JoinHandle, Poll}; |
7 | 8 |
|
8 | | -cfg_unstable! { |
9 | | - use once_cell::sync::Lazy; |
10 | | - use std::io::Write as _; |
11 | | -} |
| 9 | +use once_cell::sync::Lazy; |
12 | 10 |
|
13 | 11 | /// Constructs a new handle to the standard error of the current process. |
14 | 12 | /// |
@@ -65,13 +63,9 @@ pub struct Stderr(Mutex<State>); |
65 | 63 | /// |
66 | 64 | /// [`Write`]: trait.Read.html |
67 | 65 | /// [`Stderr::lock`]: struct.Stderr.html#method.lock |
68 | | -#[cfg(feature = "unstable")] |
69 | | -#[cfg_attr(feature = "docs", doc(cfg(unstable)))] |
70 | 66 | #[derive(Debug)] |
71 | 67 | pub struct StderrLock<'a>(std::io::StderrLock<'a>); |
72 | 68 |
|
73 | | -#[cfg(feature = "unstable")] |
74 | | -#[cfg_attr(feature = "docs", doc(cfg(unstable)))] |
75 | 69 | unsafe impl Send for StderrLock<'_> {} |
76 | 70 |
|
77 | 71 | /// The state of the asynchronous stderr. |
@@ -128,8 +122,6 @@ impl Stderr { |
128 | 122 | /// # |
129 | 123 | /// # Ok(()) }) } |
130 | 124 | /// ``` |
131 | | - #[cfg_attr(feature = "docs", doc(cfg(unstable)))] |
132 | | - #[cfg(any(feature = "unstable", feature = "docs"))] |
133 | 125 | pub async fn lock(&self) -> StderrLock<'static> { |
134 | 126 | static STDERR: Lazy<std::io::Stderr> = Lazy::new(std::io::stderr); |
135 | 127 |
|
@@ -240,8 +232,6 @@ cfg_windows! { |
240 | 232 | } |
241 | 233 | } |
242 | 234 |
|
243 | | -#[cfg(feature = "unstable")] |
244 | | -#[cfg_attr(feature = "docs", doc(cfg(unstable)))] |
245 | 235 | impl io::Write for StderrLock<'_> { |
246 | 236 | fn poll_write( |
247 | 237 | mut self: Pin<&mut Self>, |
|
0 commit comments