Fix clippy::correctness in the library
This commit is contained in:
@@ -192,6 +192,7 @@ impl ToString for TokenStream {
|
||||
/// with `Delimiter::None` delimiters and negative numeric literals.
|
||||
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
|
||||
impl fmt::Display for TokenStream {
|
||||
#[allow(clippy::recursive_format_impl)] // clippy doesn't see the specialization
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.write_str(&self.to_string())
|
||||
}
|
||||
@@ -759,6 +760,7 @@ impl ToString for TokenTree {
|
||||
/// with `Delimiter::None` delimiters and negative numeric literals.
|
||||
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
|
||||
impl fmt::Display for TokenTree {
|
||||
#[allow(clippy::recursive_format_impl)] // clippy doesn't see the specialization
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.write_str(&self.to_string())
|
||||
}
|
||||
@@ -889,6 +891,7 @@ impl ToString for Group {
|
||||
/// with `Delimiter::None` delimiters.
|
||||
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
|
||||
impl fmt::Display for Group {
|
||||
#[allow(clippy::recursive_format_impl)] // clippy doesn't see the specialization
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.write_str(&self.to_string())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user