File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
futures-util/src/async_await Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ use proc_macro_hack::proc_macro_hack;
5
5
#[ doc( hidden) ]
6
6
#[ macro_export]
7
7
macro_rules! document_select_macro {
8
- ( $select: item $select_biased: item) => {
8
+ // This branch is required for `futures 0.3.1`, from before select_biased was introduced
9
+ ( $select: item) => {
9
10
/// Polls multiple futures and streams simultaneously, executing the branch
10
11
/// for the future that finishes first. If multiple futures are ready,
11
12
/// one will be pseudo-randomly selected at runtime. Futures directly
@@ -154,6 +155,10 @@ macro_rules! document_select_macro {
154
155
/// more complex behavior such as timer resets or writing into the head of
155
156
/// a stream.
156
157
$select
158
+ } ;
159
+
160
+ ( $select: item $select_biased: item) => {
161
+ $crate:: document_select_macro!( $select) ;
157
162
158
163
/// Polls multiple futures and streams simultaneously, executing the branch
159
164
/// for the future that finishes first. Unlike [`select!`], if multiple futures are ready,
@@ -302,7 +307,7 @@ macro_rules! document_select_macro {
302
307
///
303
308
/// [`select!`]: macro.select.html
304
309
$select_biased
305
- }
310
+ } ;
306
311
}
307
312
308
313
document_select_macro ! {
You can’t perform that action at this time.
0 commit comments