about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-05-02 10:17:10 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-05-03 09:06:26 +1000
commit5ac017e772a28b86170eab7a056feb9e42d557c2 (patch)
treea40757d4c9bce7c14953367449cf1c6b2e112df9
parentae7e32880af6b4f2de26ee8842e9995896de21a0 (diff)
downloadrust-5ac017e772a28b86170eab7a056feb9e42d557c2.tar.gz
rust-5ac017e772a28b86170eab7a056feb9e42d557c2.zip
Type annotate `repeats`.
Because the type is not obvious, and this clarifies things.
-rw-r--r--compiler/rustc_expand/src/mbe/transcribe.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_expand/src/mbe/transcribe.rs b/compiler/rustc_expand/src/mbe/transcribe.rs
index dad83984c8b..48fdde07f42 100644
--- a/compiler/rustc_expand/src/mbe/transcribe.rs
+++ b/compiler/rustc_expand/src/mbe/transcribe.rs
@@ -117,7 +117,7 @@ pub(super) fn transcribe<'a>(
     // As we descend in the RHS, we will need to be able to match nested sequences of matchers.
     // `repeats` keeps track of where we are in matching at each level, with the last element being
     // the most deeply nested sequence. This is used as a stack.
-    let mut repeats = Vec::new();
+    let mut repeats: Vec<(usize, usize)> = Vec::new();
 
     // `result` contains resulting token stream from the TokenTree we just finished processing. At
     // the end, this will contain the full result of transcription, but at arbitrary points during