Skip to content

Commit 07bcf4a

Browse files
Bring back the colon separators for the macro munching.
Co-Authored-By: Ibraheem Ahmed <[email protected]>
1 parent 846cb9c commit 07bcf4a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

library/core/src/future/join.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ use crate::task::{Context, Poll};
4848
pub macro join( $($fut:expr),+ $(,)? ) {
4949
// Funnel through an internal macro not to leak implementation details.
5050
join_internal! {
51-
current_position[]
52-
futures_and_positions[]
53-
munching[ $($fut)+ ]
51+
current_position: []
52+
futures_and_positions: []
53+
munching: [ $($fut)+ ]
5454
}
5555
}
5656

@@ -64,44 +64,44 @@ macro join_internal {
6464
// Recursion step: map each future with its "position" (underscore count).
6565
(
6666
// Accumulate a token for each future that has been expanded: "_ _ _".
67-
current_position[
67+
current_position: [
6868
$($underscores:tt)*
6969
]
7070
// Accumulate Futures and their positions in the tuple: `_0th () _1st ( _ ) …`.
71-
futures_and_positions[
71+
futures_and_positions: [
7272
$($acc:tt)*
7373
]
7474
// Munch one future.
75-
munching[
75+
munching: [
7676
$current:tt
7777
$($rest:tt)*
7878
]
7979
) => (
8080
join_internal! {
81-
current_position[
81+
current_position: [
8282
$($underscores)*
8383
_
8484
]
85-
futures_and_positions[
85+
futures_and_positions: [
8686
$($acc)*
8787
$current ( $($underscores)* )
8888
]
89-
munching[
89+
munching: [
9090
$($rest)*
9191
]
9292
}
9393
),
9494

9595
// End of recursion: generate the output future.
9696
(
97-
current_position $_:tt
98-
futures_and_positions[
97+
current_position: $_:tt
98+
futures_and_positions: [
9999
$(
100100
$fut_expr:tt ( $($pos:tt)* )
101101
)*
102102
]
103103
// Nothing left to munch.
104-
munching[]
104+
munching: []
105105
) => (
106106
match ( $( MaybeDone::Future($fut_expr), )* ) { futures => async {
107107
let mut futures = futures;

0 commit comments

Comments
 (0)