@@ -341,7 +341,7 @@ pub fn tts_to_string(tts: &[tokenstream::TokenTree]) -> String {
341
341
}
342
342
343
343
pub fn tokens_to_string ( tokens : TokenStream ) -> String {
344
- to_string ( |s| s. print_tts_ext ( tokens, false ) )
344
+ to_string ( |s| s. print_tts ( tokens, false ) )
345
345
}
346
346
347
347
pub fn stmt_to_string ( stmt : & ast:: Stmt ) -> String {
@@ -629,7 +629,7 @@ pub trait PrintState<'a>: std::ops::Deref<Target=pp::Printer> + std::ops::DerefM
629
629
} else {
630
630
self . print_attribute_path ( & attr. path ) ;
631
631
self . space ( ) ;
632
- self . print_tts ( attr. tokens . clone ( ) ) ;
632
+ self . print_tts ( attr. tokens . clone ( ) , true ) ;
633
633
}
634
634
self . word ( "]" ) ;
635
635
}
@@ -696,11 +696,7 @@ pub trait PrintState<'a>: std::ops::Deref<Target=pp::Printer> + std::ops::DerefM
696
696
}
697
697
}
698
698
699
- fn print_tts ( & mut self , tts : tokenstream:: TokenStream ) {
700
- self . print_tts_ext ( tts, true )
701
- }
702
-
703
- fn print_tts_ext ( & mut self , tts : tokenstream:: TokenStream , convert_dollar_crate : bool ) {
699
+ fn print_tts ( & mut self , tts : tokenstream:: TokenStream , convert_dollar_crate : bool ) {
704
700
self . ibox ( 0 ) ;
705
701
for ( i, tt) in tts. into_trees ( ) . enumerate ( ) {
706
702
if i != 0 {
@@ -1247,7 +1243,7 @@ impl<'a> State<'a> {
1247
1243
self . print_ident ( item. ident ) ;
1248
1244
self . cbox ( INDENT_UNIT ) ;
1249
1245
self . popen ( ) ;
1250
- self . print_tts ( mac. node . stream ( ) ) ;
1246
+ self . print_tts ( mac. node . stream ( ) , true ) ;
1251
1247
self . pclose ( ) ;
1252
1248
self . s . word ( ";" ) ;
1253
1249
self . end ( ) ;
@@ -1258,7 +1254,7 @@ impl<'a> State<'a> {
1258
1254
self . print_ident ( item. ident ) ;
1259
1255
self . cbox ( INDENT_UNIT ) ;
1260
1256
self . popen ( ) ;
1261
- self . print_tts ( tts. stream ( ) ) ;
1257
+ self . print_tts ( tts. stream ( ) , true ) ;
1262
1258
self . pclose ( ) ;
1263
1259
self . s . word ( ";" ) ;
1264
1260
self . end ( ) ;
@@ -1659,7 +1655,7 @@ impl<'a> State<'a> {
1659
1655
self . bopen ( ) ;
1660
1656
}
1661
1657
}
1662
- self . print_tts ( m. node . stream ( ) ) ;
1658
+ self . print_tts ( m. node . stream ( ) , true ) ;
1663
1659
match m. node . delim {
1664
1660
MacDelimiter :: Parenthesis => self . pclose ( ) ,
1665
1661
MacDelimiter :: Bracket => self . s . word ( "]" ) ,
0 commit comments