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

Add #[automatically_derived] to derive macros #216

Closed
tqwewe opened this issue Sep 30, 2021 · 1 comment · Fixed by #246
Closed

Add #[automatically_derived] to derive macros #216

tqwewe opened this issue Sep 30, 2021 · 1 comment · Fixed by #246
Assignees

Comments

@tqwewe
Copy link
Contributor

tqwewe commented Sep 30, 2021

Each implementation generated by macros should be tagged with the attribute #[automatically_derived].
Many other libraries including serde and sqlx do this. I'm not sure what tools currently use this, but it would be a minor improvement, but definitely not important at this stage.

https://doc.rust-lang.org/reference/attributes/derive.html#the-automatically_derived-attribute

As an example:

// sea-orm-macros/src/derives/active_model.rs
quote!(
    #[automatically_derived]
    impl sea_orm::ActiveModelTrait for ActiveModel {
        ...
    }
)
@tyt2y3
Copy link
Member

tyt2y3 commented Sep 30, 2021

Sure, I agree. A PR will be appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants