1- cfg_unstable ! {
2- mod delay;
3- mod flatten;
4- mod race;
5- mod try_race;
6- mod join;
7- mod try_join;
8-
9- use std:: time:: Duration ;
10- use delay:: DelayFuture ;
11- use flatten:: FlattenFuture ;
12- use crate :: future:: IntoFuture ;
13- use race:: Race ;
14- use try_race:: TryRace ;
15- use join:: Join ;
16- use try_join:: TryJoin ;
17- }
18-
19- cfg_unstable_default ! {
20- use crate :: future:: timeout:: TimeoutFuture ;
21- }
1+ mod delay;
2+ mod flatten;
3+ mod race;
4+ mod try_race;
5+ mod join;
6+ mod try_join;
7+
8+ use std:: time:: Duration ;
9+ use delay:: DelayFuture ;
10+ use flatten:: FlattenFuture ;
11+ use race:: Race ;
12+ use try_race:: TryRace ;
13+ use join:: Join ;
14+ use try_join:: TryJoin ;
15+
16+ #[ cfg( feature = "default" ) ]
17+ use crate :: future:: timeout:: TimeoutFuture ;
18+
19+ use crate :: future:: IntoFuture ;
2220
2321extension_trait ! {
2422 use core:: pin:: Pin ;
@@ -151,8 +149,6 @@ extension_trait! {
151149 /// dbg!(a.await);
152150 /// # })
153151 /// ```
154- #[ cfg( feature = "unstable" ) ]
155- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
156152 fn delay( self , dur: Duration ) -> impl Future <Output = Self :: Output > [ DelayFuture <Self >]
157153 where
158154 Self : Sized ,
@@ -174,8 +170,6 @@ extension_trait! {
174170 /// assert_eq!(future.await, 1);
175171 /// # })
176172 /// ```
177- #[ cfg( feature = "unstable" ) ]
178- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
179173 fn flatten(
180174 self ,
181175 ) -> impl Future <Output = <Self :: Output as IntoFuture >:: Output >
@@ -216,8 +210,6 @@ extension_trait! {
216210 # });
217211 ```
218212 "# ]
219- #[ cfg( feature = "unstable" ) ]
220- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
221213 fn race<F >(
222214 self ,
223215 other: F ,
@@ -262,8 +254,6 @@ extension_trait! {
262254 # Ok(()) }) }
263255 ```
264256 "# ]
265- #[ cfg( feature = "unstable" ) ]
266- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
267257 fn try_race<F , T , E >(
268258 self ,
269259 other: F
@@ -299,8 +289,6 @@ extension_trait! {
299289 # });
300290 ```
301291 "# ]
302- #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
303- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
304292 fn join<F >(
305293 self ,
306294 other: F
@@ -346,8 +334,6 @@ extension_trait! {
346334 # Ok(()) }) }
347335 ```
348336 "# ]
349- #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
350- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
351337 fn try_join<F , A , B , E >(
352338 self ,
353339 other: F
@@ -385,8 +371,7 @@ extension_trait! {
385371 # });
386372 ```
387373 "# ]
388- #[ cfg( any( all( feature = "default" , feature = "unstable" ) , feature = "docs" ) ) ]
389- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
374+ #[ cfg( feature = "default" ) ]
390375 fn timeout( self , dur: Duration ) -> impl Future <Output = Self :: Output > [ TimeoutFuture <Self >]
391376 where Self : Sized
392377 {
0 commit comments