File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ use crate::task::{Context, Poll};
48
48
pub macro join ( $( $fut: expr) , + $( , ) ? ) {
49
49
// Funnel through an internal macro not to leak implementation details.
50
50
join_internal ! {
51
- current_position[ ]
52
- futures_and_positions[ ]
53
- munching[ $( $fut) + ]
51
+ current_position: [ ]
52
+ futures_and_positions: [ ]
53
+ munching: [ $( $fut) + ]
54
54
}
55
55
}
56
56
@@ -64,44 +64,44 @@ macro join_internal {
64
64
// Recursion step: map each future with its "position" (underscore count).
65
65
(
66
66
// Accumulate a token for each future that has been expanded: "_ _ _".
67
- current_position[
67
+ current_position: [
68
68
$( $underscores: tt) *
69
69
]
70
70
// Accumulate Futures and their positions in the tuple: `_0th () _1st ( _ ) …`.
71
- futures_and_positions[
71
+ futures_and_positions: [
72
72
$( $acc: tt) *
73
73
]
74
74
// Munch one future.
75
- munching[
75
+ munching: [
76
76
$current: tt
77
77
$( $rest: tt) *
78
78
]
79
79
) => (
80
80
join_internal ! {
81
- current_position[
81
+ current_position: [
82
82
$( $underscores) *
83
83
_
84
84
]
85
- futures_and_positions[
85
+ futures_and_positions: [
86
86
$( $acc) *
87
87
$current ( $( $underscores) * )
88
88
]
89
- munching[
89
+ munching: [
90
90
$( $rest) *
91
91
]
92
92
}
93
93
) ,
94
94
95
95
// End of recursion: generate the output future.
96
96
(
97
- current_position $_: tt
98
- futures_and_positions[
97
+ current_position: $_: tt
98
+ futures_and_positions: [
99
99
$(
100
100
$fut_expr: tt ( $( $pos: tt) * )
101
101
) *
102
102
]
103
103
// Nothing left to munch.
104
- munching[ ]
104
+ munching: [ ]
105
105
) => (
106
106
match ( $( MaybeDone :: Future ( $fut_expr) , ) * ) { futures => async {
107
107
let mut futures = futures;
You can’t perform that action at this time.
0 commit comments