From 0bbc34bc251a079071f8cf8ca63a4552e977282a Mon Sep 17 00:00:00 2001 From: abbform Date: Wed, 6 Jul 2022 21:58:48 +0800 Subject: [PATCH] make #derive before #attr when derive --- macro/src/expand.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macro/src/expand.rs b/macro/src/expand.rs index 7e93368b6..06995361a 100644 --- a/macro/src/expand.rs +++ b/macro/src/expand.rs @@ -172,8 +172,8 @@ fn expand_struct(strct: &Struct) -> TokenStream { quote! { #doc - #attrs #derives + #attrs #[repr(C)] #struct_def @@ -342,8 +342,8 @@ fn expand_enum(enm: &Enum) -> TokenStream { quote! { #doc - #attrs #derives + #attrs #[repr(transparent)] #enum_def