@@ -201,6 +201,7 @@ impl ToString for TokenStream {
201
201
/// `TokenTree::Punct`, or `TokenTree::Literal`.
202
202
#[ stable( feature = "proc_macro_lib" , since = "1.15.0" ) ]
203
203
impl fmt:: Display for TokenStream {
204
+ #[ allow( clippy:: recursive_format_impl) ] // clippy doesn't see the specialization
204
205
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
205
206
f. write_str ( & self . to_string ( ) )
206
207
}
@@ -776,6 +777,7 @@ impl ToString for TokenTree {
776
777
/// `TokenTree::Punct`, or `TokenTree::Literal`.
777
778
#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
778
779
impl fmt:: Display for TokenTree {
780
+ #[ allow( clippy:: recursive_format_impl) ] // clippy doesn't see the specialization
779
781
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
780
782
f. write_str ( & self . to_string ( ) )
781
783
}
@@ -906,6 +908,7 @@ impl ToString for Group {
906
908
/// with `Delimiter::None` delimiters.
907
909
#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
908
910
impl fmt:: Display for Group {
911
+ #[ allow( clippy:: recursive_format_impl) ] // clippy doesn't see the specialization
909
912
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
910
913
f. write_str ( & self . to_string ( ) )
911
914
}
0 commit comments