@@ -7,14 +7,16 @@ cfg_unstable! {
77 mod try_join;
88
99 use std:: time:: Duration ;
10-
1110 use delay:: DelayFuture ;
1211 use flatten:: FlattenFuture ;
1312 use crate :: future:: IntoFuture ;
1413 use race:: Race ;
1514 use try_race:: TryRace ;
1615 use join:: Join ;
1716 use try_join:: TryJoin ;
17+ }
18+
19+ cfg_unstable_default ! {
1820 use crate :: future:: timeout:: TimeoutFuture ;
1921}
2022
@@ -149,7 +151,7 @@ extension_trait! {
149151 /// dbg!(a.await);
150152 /// # })
151153 /// ```
152- #[ cfg( all ( feature = "default" , feature = " unstable") ) ]
154+ #[ cfg( feature = "unstable" ) ]
153155 #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
154156 fn delay( self , dur: Duration ) -> impl Future <Output = Self :: Output > [ DelayFuture <Self >]
155157 where
@@ -363,13 +365,13 @@ extension_trait! {
363365
364366 # Example
365367 ```
366- # async_std::task::block_on(async {
368+ # async_std::task::block_on(async {
367369 #
368370 use std::time::Duration;
369371
370372 use async_std::prelude::*;
371373 use async_std::future;
372-
374+
373375 let fut = future::ready(0);
374376 let dur = Duration::from_millis(100);
375377 let res = fut.timeout(dur).await;
@@ -383,7 +385,7 @@ extension_trait! {
383385 # });
384386 ```
385387 "# ]
386- #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
388+ #[ cfg( any( all ( feature = "default" , feature = " unstable") , feature = "docs" ) ) ]
387389 #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
388390 fn timeout( self , dur: Duration ) -> impl Future <Output = Self :: Output > [ TimeoutFuture <Self >]
389391 where Self : Sized
0 commit comments