From ec9ac76c52a1ffcb1e442565d4924385b6611546 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 4 Sep 2021 12:42:56 -0700 Subject: [PATCH] Revert "Suppress nonstandard_macro_braces in generated code" This reverts commit 245e7cfd149140806ecef89d44b14e9557b297b1. --- impl/src/expand.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/impl/src/expand.rs b/impl/src/expand.rs index 5855128..19ce42a 100644 --- a/impl/src/expand.rs +++ b/impl/src/expand.rs @@ -117,11 +117,7 @@ fn impl_struct(input: Struct) -> TokenStream { quote! { #[allow(unused_qualifications)] impl #impl_generics std::fmt::Display for #ty #ty_generics #where_clause { - #[allow( - // Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422 - clippy::nonstandard_macro_braces, - clippy::used_underscore_binding, - )] + #[allow(clippy::used_underscore_binding)] fn fmt(&self, __formatter: &mut std::fmt::Formatter) -> std::fmt::Result { #body } @@ -330,13 +326,7 @@ fn impl_enum(input: Enum) -> TokenStream { impl #impl_generics std::fmt::Display for #ty #ty_generics #where_clause { fn fmt(&self, __formatter: &mut std::fmt::Formatter) -> std::fmt::Result { #use_as_display - #[allow( - unused_variables, - deprecated, - // Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422 - clippy::nonstandard_macro_braces, - clippy::used_underscore_binding, - )] + #[allow(unused_variables, deprecated, clippy::used_underscore_binding)] match #void_deref self { #(#arms,)* }