Skip to content

Commit

Permalink
chore(sol-macro): move generated docs below input attrs (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Oct 10, 2023
1 parent b3f7538 commit 5ef2d9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/sol-macro/src/expand/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ pub(super) fn expand(cx: &ExpCtxt<'_>, error: &ItemError) -> Result<TokenStream>
))
});
let tokens = quote! {
#doc
#(#attrs)*
#doc
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct #name {
Expand Down
2 changes: 1 addition & 1 deletion crates/sol-macro/src/expand/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ pub(super) fn expand(cx: &ExpCtxt<'_>, event: &ItemEvent) -> Result<TokenStream>
))
});
let tokens = quote! {
#doc
#(#attrs)*
#doc
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
pub struct #name {
#(pub #fields,)*
Expand Down
4 changes: 2 additions & 2 deletions crates/sol-macro/src/expand/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ pub(super) fn expand(cx: &ExpCtxt<'_>, function: &ItemFunction) -> Result<TokenS
});

let tokens = quote! {
#call_doc
#(#call_attrs)*
#call_doc
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct #call_name {
#(#call_fields),*
}

#return_doc
#(#return_attrs)*
#return_doc
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct #return_name {
Expand Down

0 comments on commit 5ef2d9f

Please sign in to comment.