|
1 |
| -mod select; |
2 |
| -mod try_select; |
| 1 | +cfg_unstable! { |
| 2 | + mod select; |
| 3 | + mod try_select; |
3 | 4 |
|
4 |
| -use select::Select; |
5 |
| -use try_select::TrySelect; |
| 5 | + use select::Select; |
| 6 | + use try_select::TrySelect; |
| 7 | +} |
6 | 8 |
|
7 | 9 | extension_trait! {
|
8 | 10 | use std::pin::Pin;
|
@@ -135,11 +137,13 @@ extension_trait! {
|
135 | 137 | # });
|
136 | 138 | ```
|
137 | 139 | "#]
|
| 140 | + #[cfg(any(feature = "unstable", feature = "docs"))] |
| 141 | + #[cfg_attr(feature = "docs", doc(cfg(unstable)))] |
138 | 142 | fn select<F>(self, other: F) ->
|
139 |
| - impl Future<Output = Self::Output> [Select<Self, F>] |
140 |
| - where |
141 |
| - Self: Sized + Future, |
142 |
| - F: std::future::Future<Output = <Self as Future>::Output>, |
| 143 | + impl Future<Output = Self::Output> [Select<Self, F>] |
| 144 | + where |
| 145 | + Self: Sized + Future, |
| 146 | + F: std::future::Future<Output = <Self as Future>::Output>, |
143 | 147 | {
|
144 | 148 | Select::new(self, other)
|
145 | 149 | }
|
@@ -172,12 +176,14 @@ extension_trait! {
|
172 | 176 | # Ok(()) }) }
|
173 | 177 | ```
|
174 | 178 | "#]
|
| 179 | + #[cfg(any(feature = "unstable", feature = "docs"))] |
| 180 | + #[cfg_attr(feature = "docs", doc(cfg(unstable)))] |
175 | 181 | fn try_select<F, T, E>(self, other: F) ->
|
176 |
| - impl Future<Output = Self::Output> [TrySelect<Self, F>] |
177 |
| - where |
178 |
| - Self: Sized, |
179 |
| - Self: Future<Output = Result<T, E>>, |
180 |
| - F: Future<Output = Self::Output>, |
| 182 | + impl Future<Output = Self::Output> [TrySelect<Self, F>] |
| 183 | + where |
| 184 | + Self: Sized, |
| 185 | + Self: Future<Output = Result<T, E>>, |
| 186 | + F: Future<Output = Self::Output>, |
181 | 187 | {
|
182 | 188 | TrySelect::new(self, other)
|
183 | 189 | }
|
|
0 commit comments