File tree 3 files changed +18
-3
lines changed
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 1
- use once_cell:: sync:: Lazy ;
2
1
use std:: io:: Write as StdWrite ;
3
2
use std:: pin:: Pin ;
4
3
use std:: sync:: Mutex ;
@@ -7,6 +6,10 @@ use crate::future::Future;
7
6
use crate :: io:: { self , Write } ;
8
7
use crate :: task:: { spawn_blocking, Context , JoinHandle , Poll } ;
9
8
9
+ cfg_unstable ! {
10
+ use once_cell:: sync:: Lazy ;
11
+ }
12
+
10
13
/// Constructs a new handle to the standard error of the current process.
11
14
///
12
15
/// This function is an async version of [`std::io::stderr`].
@@ -119,6 +122,8 @@ impl Stderr {
119
122
/// #
120
123
/// # Ok(()) }) }
121
124
/// ```
125
+ #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
126
+ #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
122
127
pub async fn lock ( & self ) -> StderrLock < ' static > {
123
128
static STDERR : Lazy < std:: io:: Stderr > = Lazy :: new ( std:: io:: stderr) ;
124
129
Original file line number Diff line number Diff line change 1
- use once_cell:: sync:: Lazy ;
2
1
use std:: pin:: Pin ;
3
2
use std:: sync:: Mutex ;
4
3
5
4
use crate :: future:: { self , Future } ;
6
5
use crate :: io:: { self , Read } ;
7
6
use crate :: task:: { spawn_blocking, Context , JoinHandle , Poll } ;
8
7
8
+ cfg_unstable ! {
9
+ use once_cell:: sync:: Lazy ;
10
+ }
11
+
9
12
/// Constructs a new handle to the standard input of the current process.
10
13
///
11
14
/// This function is an async version of [`std::io::stdin`].
@@ -175,6 +178,8 @@ impl Stdin {
175
178
/// #
176
179
/// # Ok(()) }) }
177
180
/// ```
181
+ #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
182
+ #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
178
183
pub async fn lock ( & self ) -> StdinLock < ' static > {
179
184
static STDIN : Lazy < std:: io:: Stdin > = Lazy :: new ( std:: io:: stdin) ;
180
185
Original file line number Diff line number Diff line change 1
- use once_cell:: sync:: Lazy ;
2
1
use std:: io:: Write as StdWrite ;
3
2
use std:: pin:: Pin ;
4
3
use std:: sync:: Mutex ;
@@ -7,6 +6,10 @@ use crate::future::Future;
7
6
use crate :: io:: { self , Write } ;
8
7
use crate :: task:: { spawn_blocking, Context , JoinHandle , Poll } ;
9
8
9
+ cfg_unstable ! {
10
+ use once_cell:: sync:: Lazy ;
11
+ }
12
+
10
13
/// Constructs a new handle to the standard output of the current process.
11
14
///
12
15
/// This function is an async version of [`std::io::stdout`].
@@ -119,6 +122,8 @@ impl Stdout {
119
122
/// #
120
123
/// # Ok(()) }) }
121
124
/// ```
125
+ #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
126
+ #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
122
127
pub async fn lock ( & self ) -> StdoutLock < ' static > {
123
128
static STDOUT : Lazy < std:: io:: Stdout > = Lazy :: new ( std:: io:: stdout) ;
124
129
You can’t perform that action at this time.
0 commit comments