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

Allow missing documentation on the autogenerated constructor #89

Merged
merged 1 commit into from
May 17, 2024

Conversation

agvallejo
Copy link

Otherwise it triggers the missing_docs warning on dependent projects, which may turn into hard faults depending on project configuration.

@agvallejo
Copy link
Author

Ugh. The contents of rustdoc are not tokenized like the others inside a proc-macro (AFAICS), so #ident from patch1 is left as-is. I've removed #ident from the line altogether in v2. It's all fairly inconsequential, and adding #[allow(missing_docs)] would work equally fine.

@hecatia-elegua
Copy link
Owner

Any idea why I don't get this warning on my projects? I know modular_bitfield had a similar problem, but why does it only happen sometimes?
I would go for the allow rule.

@agvallejo
Copy link
Author

agvallejo commented May 8, 2024

It's an opt-in warning. You can see it with cargo clippy -- -D missing_docs.

EDIT: New version with just the lint override

Otherwise it triggers the missing_docs warning on dependent projects
should it be enabled (i.e: via "cargo clippy -- -D missing_docs").

Signed-off-by: Alejandro G. Vallejo <[email protected]>
@agvallejo agvallejo changed the title Add rustdoc header to the struct constructors Allow missing documentation on the autogenerated constructor May 8, 2024
@hecatia-elegua hecatia-elegua merged commit 0140906 into hecatia-elegua:main May 17, 2024
1 of 2 checks passed
@hecatia-elegua
Copy link
Owner

thanks, yeah that makes sense!

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 this pull request may close these issues.

2 participants