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 ;
22
20
23
21
extension_trait ! {
24
22
use core:: pin:: Pin ;
@@ -151,8 +149,6 @@ extension_trait! {
151
149
/// dbg!(a.await);
152
150
/// # })
153
151
/// ```
154
- #[ cfg( feature = "unstable" ) ]
155
- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
156
152
fn delay( self , dur: Duration ) -> impl Future <Output = Self :: Output > [ DelayFuture <Self >]
157
153
where
158
154
Self : Sized ,
@@ -174,8 +170,6 @@ extension_trait! {
174
170
/// assert_eq!(future.await, 1);
175
171
/// # })
176
172
/// ```
177
- #[ cfg( feature = "unstable" ) ]
178
- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
179
173
fn flatten(
180
174
self ,
181
175
) -> impl Future <Output = <Self :: Output as IntoFuture >:: Output >
@@ -216,8 +210,6 @@ extension_trait! {
216
210
# });
217
211
```
218
212
"# ]
219
- #[ cfg( feature = "unstable" ) ]
220
- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
221
213
fn race<F >(
222
214
self ,
223
215
other: F ,
@@ -262,8 +254,6 @@ extension_trait! {
262
254
# Ok(()) }) }
263
255
```
264
256
"# ]
265
- #[ cfg( feature = "unstable" ) ]
266
- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
267
257
fn try_race<F , T , E >(
268
258
self ,
269
259
other: F
@@ -299,8 +289,6 @@ extension_trait! {
299
289
# });
300
290
```
301
291
"# ]
302
- #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
303
- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
304
292
fn join<F >(
305
293
self ,
306
294
other: F
@@ -346,8 +334,6 @@ extension_trait! {
346
334
# Ok(()) }) }
347
335
```
348
336
"# ]
349
- #[ cfg( any( feature = "unstable" , feature = "docs" ) ) ]
350
- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
351
337
fn try_join<F , A , B , E >(
352
338
self ,
353
339
other: F
@@ -385,8 +371,7 @@ extension_trait! {
385
371
# });
386
372
```
387
373
"# ]
388
- #[ cfg( any( all( feature = "default" , feature = "unstable" ) , feature = "docs" ) ) ]
389
- #[ cfg_attr( feature = "docs" , doc( cfg( unstable) ) ) ]
374
+ #[ cfg( feature = "default" ) ]
390
375
fn timeout( self , dur: Duration ) -> impl Future <Output = Self :: Output > [ TimeoutFuture <Self >]
391
376
where Self : Sized
392
377
{
0 commit comments