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

Should #[automatically_derived] docs contain advice for derive macros? #1439

Open
eric-seppanen opened this issue Dec 14, 2023 · 0 comments
Open

Comments

@eric-seppanen
Copy link

The documentation for #[automatically_derived] currently states:

The automatically_derived attribute is automatically added to implementations created by the derive attribute for built-in traits. It has no direct effect, but it may be used by tools and diagnostic lints to detect these automatically generated implementations.

I think the suggestion that this is only for built-in traits is incomplete; it's in use by many crates, including serde, clap, bevy, yew...

Also the "may be used by tools and diagnostic lints" seems vague: is this attribute recommended for use in derive macro output, for the purpose of suppressing clippy lints? Would this strategy be not recommended? I have seen a few github issues on proc-macro crates, and it does not seem like this attribute is well understood by crate authors.

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

No branches or pull requests

1 participant