@@ -201,6 +201,7 @@ impl ToString for TokenStream {
201201/// `TokenTree::Punct`, or `TokenTree::Literal`.
202202#[ stable( feature = "proc_macro_lib" , since = "1.15.0" ) ]
203203impl fmt:: Display for TokenStream {
204+ #[ allow( clippy:: recursive_format_impl) ] // clippy doesn't see the specialization
204205 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
205206 f. write_str ( & self . to_string ( ) )
206207 }
@@ -776,6 +777,7 @@ impl ToString for TokenTree {
776777/// `TokenTree::Punct`, or `TokenTree::Literal`.
777778#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
778779impl fmt:: Display for TokenTree {
780+ #[ allow( clippy:: recursive_format_impl) ] // clippy doesn't see the specialization
779781 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
780782 f. write_str ( & self . to_string ( ) )
781783 }
@@ -906,6 +908,7 @@ impl ToString for Group {
906908/// with `Delimiter::None` delimiters.
907909#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
908910impl fmt:: Display for Group {
911+ #[ allow( clippy:: recursive_format_impl) ] // clippy doesn't see the specialization
909912 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
910913 f. write_str ( & self . to_string ( ) )
911914 }
0 commit comments