Skip to content

Commit 6f60156

Browse files
committed
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.
1 parent 3d750e2 commit 6f60156

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compiler/rustc_parse/src/parser/attr_wrapper.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl {
113113
.take(self.num_calls as usize);
114114

115115
if self.replace_ranges.is_empty() {
116-
make_token_stream(tokens, self.break_last_token)
116+
make_attr_token_stream(tokens, self.break_last_token)
117117
} else {
118118
let mut tokens: Vec<_> = tokens.collect();
119119
let mut replace_ranges = self.replace_ranges.to_vec();
@@ -166,7 +166,7 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl {
166166
new_tokens.into_iter().chain(filler),
167167
);
168168
}
169-
make_token_stream(tokens.into_iter(), self.break_last_token)
169+
make_attr_token_stream(tokens.into_iter(), self.break_last_token)
170170
}
171171
}
172172
}
@@ -374,10 +374,10 @@ impl<'a> Parser<'a> {
374374
}
375375
}
376376

377-
/// Converts a flattened iterator of tokens (including open and close delimiter tokens)
378-
/// into a `TokenStream`, creating a `TokenTree::Delimited` for each matching pair
379-
/// of open and close delims.
380-
fn make_token_stream(
377+
/// Converts a flattened iterator of tokens (including open and close delimiter tokens) into an
378+
/// `AttrTokenStream`, creating an `AttrTokenTree::Delimited` for each matching pair of open and
379+
/// close delims.
380+
fn make_attr_token_stream(
381381
mut iter: impl Iterator<Item = (FlatToken, Spacing)>,
382382
break_last_token: bool,
383383
) -> AttrTokenStream {

0 commit comments

Comments
 (0)