@@ -7,14 +7,16 @@ cfg_unstable! {
7
7
mod try_join;
8
8
9
9
use std:: time:: Duration ;
10
-
11
10
use delay:: DelayFuture ;
12
11
use flatten:: FlattenFuture ;
13
12
use crate :: future:: IntoFuture ;
14
13
use race:: Race ;
15
14
use try_race:: TryRace ;
16
15
use join:: Join ;
17
16
use try_join:: TryJoin ;
17
+ }
18
+
19
+ cfg_unstable_default ! {
18
20
use crate :: future:: timeout:: TimeoutFuture ;
19
21
}
20
22
@@ -149,7 +151,7 @@ extension_trait! {
149
151
/// dbg!(a.await);
150
152
/// # })
151
153
/// ```
152
- #[ cfg( all ( feature = "default" , feature = " unstable") ) ]
154
+ #[ cfg( feature = "unstable" ) ]
153
155
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
154
156
fn delay( self , dur: Duration ) -> impl Future <Output = Self :: Output > [ DelayFuture <Self >]
155
157
where
@@ -363,13 +365,13 @@ extension_trait! {
363
365
364
366
# Example
365
367
```
366
- # async_std::task::block_on(async {
368
+ # async_std::task::block_on(async {
367
369
#
368
370
use std::time::Duration;
369
371
370
372
use async_std::prelude::*;
371
373
use async_std::future;
372
-
374
+
373
375
let fut = future::ready(0);
374
376
let dur = Duration::from_millis(100);
375
377
let res = fut.timeout(dur).await;
@@ -383,7 +385,7 @@ extension_trait! {
383
385
# });
384
386
```
385
387
"# ]
386
- #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
388
+ #[ cfg( any( all ( feature = "default" , feature = " unstable") , feature = "docs" ) ) ]
387
389
#[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
388
390
fn timeout( self , dur: Duration ) -> impl Future <Output = Self :: Output > [ TimeoutFuture <Self >]
389
391
where Self : Sized
0 commit comments