@@ -148,7 +148,7 @@ pub fn print_crate<'a>(
148
148
149
149
/// This makes printed token streams look slightly nicer,
150
150
/// and also addresses some specific regressions described in #63896 and #73345.
151
- fn tt_prepend_space ( tt : & TokenTree , prev : & TokenTree ) -> bool {
151
+ fn space_between ( prev : & TokenTree , curr : & TokenTree ) -> bool {
152
152
if let TokenTree :: Token ( token, _) = prev {
153
153
// No space after these tokens, e.g. `x.y`, `$e`
154
154
// (The carets point to `prev`.) ^ ^
@@ -159,9 +159,9 @@ fn tt_prepend_space(tt: &TokenTree, prev: &TokenTree) -> bool {
159
159
return comment_kind != CommentKind :: Line ;
160
160
}
161
161
}
162
- match tt {
162
+ match curr {
163
163
// No space before these tokens, e.g. `foo,`, `println!`, `x.y`
164
- // (The carets point to `token `.) ^ ^ ^
164
+ // (The carets point to `curr `.) ^ ^ ^
165
165
//
166
166
// FIXME: having `Not` here works well for macro invocations like
167
167
// `println!()`, but is bad when `!` means "logical not" or "the never
@@ -575,7 +575,7 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
575
575
while let Some ( tt) = iter. next ( ) {
576
576
self . print_tt ( tt, convert_dollar_crate) ;
577
577
if let Some ( next) = iter. peek ( ) {
578
- if tt_prepend_space ( next , tt ) {
578
+ if space_between ( tt , next ) {
579
579
self . space ( ) ;
580
580
}
581
581
}
0 commit comments