1
- use std:: io:: Write as StdWrite ;
2
1
use std:: pin:: Pin ;
3
2
use std:: sync:: Mutex ;
4
3
@@ -8,6 +7,7 @@ use crate::task::{spawn_blocking, Context, JoinHandle, Poll};
8
7
9
8
cfg_unstable ! {
10
9
use once_cell:: sync:: Lazy ;
10
+ use std:: io:: Write as _;
11
11
}
12
12
13
13
/// Constructs a new handle to the standard error of the current process.
@@ -59,13 +59,19 @@ pub fn stderr() -> Stderr {
59
59
pub struct Stderr ( Mutex < State > ) ;
60
60
61
61
/// A locked reference to the Stderr handle.
62
- /// This handle implements the [`Write`] traits, and is constructed via the [`Stderr::lock`] method.
62
+ ///
63
+ /// This handle implements the [`Write`] traits, and is constructed via the [`Stderr::lock`]
64
+ /// method.
63
65
///
64
66
/// [`Write`]: trait.Read.html
65
67
/// [`Stderr::lock`]: struct.Stderr.html#method.lock
68
+ #[ cfg( feature = "unstable" ) ]
69
+ #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
66
70
#[ derive( Debug ) ]
67
71
pub struct StderrLock < ' a > ( std:: io:: StderrLock < ' a > ) ;
68
72
73
+ #[ cfg( feature = "unstable" ) ]
74
+ #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
69
75
unsafe impl Send for StderrLock < ' _ > { }
70
76
71
77
/// The state of the asynchronous stderr.
@@ -234,7 +240,9 @@ cfg_windows! {
234
240
}
235
241
}
236
242
237
- impl Write for StderrLock < ' _ > {
243
+ #[ cfg( feature = "unstable" ) ]
244
+ #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
245
+ impl io:: Write for StderrLock < ' _ > {
238
246
fn poll_write (
239
247
mut self : Pin < & mut Self > ,
240
248
_cx : & mut Context < ' _ > ,
0 commit comments