about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-07-02 17:38:43 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-07-02 17:38:43 +1000
commit6f6015679fb0153bd35d1b56df2456bb6146a9af (patch)
tree6a051d0497936e61b3da1600eb6e0df4f90339a6 /compiler/rustc_parse/src/parser
parent3d750e270279d2d8689aee3ee5cdbf60faec42bd (diff)
downloadrust-6f6015679fb0153bd35d1b56df2456bb6146a9af.tar.gz
rust-6f6015679fb0153bd35d1b56df2456bb6146a9af.zip
Rename `make_token_stream`.
And update the comment. Clearly the return type of this function was
changed at some point in the past, but its name and comment weren't
updated to match.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/attr_wrapper.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/attr_wrapper.rs b/compiler/rustc_parse/src/parser/attr_wrapper.rs
index d0d01cec816..3afd178cc2b 100644
--- a/compiler/rustc_parse/src/parser/attr_wrapper.rs
+++ b/compiler/rustc_parse/src/parser/attr_wrapper.rs
@@ -113,7 +113,7 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl {
                 .take(self.num_calls as usize);
 
         if self.replace_ranges.is_empty() {
-            make_token_stream(tokens, self.break_last_token)
+            make_attr_token_stream(tokens, self.break_last_token)
         } else {
             let mut tokens: Vec<_> = tokens.collect();
             let mut replace_ranges = self.replace_ranges.to_vec();
@@ -166,7 +166,7 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl {
                     new_tokens.into_iter().chain(filler),
                 );
             }
-            make_token_stream(tokens.into_iter(), self.break_last_token)
+            make_attr_token_stream(tokens.into_iter(), self.break_last_token)
         }
     }
 }
@@ -374,10 +374,10 @@ impl<'a> Parser<'a> {
     }
 }
 
-/// Converts a flattened iterator of tokens (including open and close delimiter tokens)
-/// into a `TokenStream`, creating a `TokenTree::Delimited` for each matching pair
-/// of open and close delims.
-fn make_token_stream(
+/// Converts a flattened iterator of tokens (including open and close delimiter tokens) into an
+/// `AttrTokenStream`, creating an `AttrTokenTree::Delimited` for each matching pair of open and
+/// close delims.
+fn make_attr_token_stream(
     mut iter: impl Iterator<Item = (FlatToken, Spacing)>,
     break_last_token: bool,
 ) -> AttrTokenStream {