Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sol-macro): move generated docs below input attrs #363

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading