about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>2021-12-09 20:12:01 +0100
committerDaniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>2021-12-09 21:05:34 +0100
commit07bcf4aad3774e8b796a0a2b0141784ede3eb88a (patch)
tree827820ed5c0c5fd2eade6abad40ca4fb7440949e
parent846cb9c583712928e66658486a6066b60b6197a4 (diff)
downloadrust-07bcf4aad3774e8b796a0a2b0141784ede3eb88a.tar.gz
rust-07bcf4aad3774e8b796a0a2b0141784ede3eb88a.zip
Bring back the colon separators for the macro munching.
Co-Authored-By: Ibraheem Ahmed <ibrah1440@gmail.com>
-rw-r--r--library/core/src/future/join.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/core/src/future/join.rs b/library/core/src/future/join.rs
index 20336bc9e4c..2d27b8edfd8 100644
--- a/library/core/src/future/join.rs
+++ b/library/core/src/future/join.rs
@@ -48,9 +48,9 @@ use crate::task::{Context, Poll};
 pub macro join( $($fut:expr),+ $(,)? ) {
     // Funnel through an internal macro not to leak implementation details.
     join_internal! {
-        current_position[]
-        futures_and_positions[]
-        munching[ $($fut)+ ]
+        current_position: []
+        futures_and_positions: []
+        munching: [ $($fut)+ ]
     }
 }
 
@@ -64,29 +64,29 @@ macro join_internal {
     // Recursion step: map each future with its "position" (underscore count).
     (
         // Accumulate a token for each future that has been expanded: "_ _ _".
-        current_position[
+        current_position: [
             $($underscores:tt)*
         ]
         // Accumulate Futures and their positions in the tuple: `_0th ()   _1st ( _ ) …`.
-        futures_and_positions[
+        futures_and_positions: [
             $($acc:tt)*
         ]
         // Munch one future.
-        munching[
+        munching: [
             $current:tt
             $($rest:tt)*
         ]
     ) => (
         join_internal! {
-            current_position[
+            current_position: [
                 $($underscores)*
                 _
             ]
-            futures_and_positions[
+            futures_and_positions: [
                 $($acc)*
                 $current ( $($underscores)* )
             ]
-            munching[
+            munching: [
                 $($rest)*
             ]
         }
@@ -94,14 +94,14 @@ macro join_internal {
 
     // End of recursion: generate the output future.
     (
-        current_position $_:tt
-        futures_and_positions[
+        current_position: $_:tt
+        futures_and_positions: [
             $(
                 $fut_expr:tt ( $($pos:tt)* )
             )*
         ]
         // Nothing left to munch.
-        munching[]
+        munching: []
     ) => (
         match ( $( MaybeDone::Future($fut_expr), )* ) { futures => async {
             let mut futures = futures;