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

Suppress rust-analyzer's "Non Snake Case" warning for generated idents #5

Merged

Conversation

nullstalgia
Copy link
Contributor

Howdy, wishing you well.

I was trying out this crate when I noticed that each #[serde_inline_default] above my structs was being marked with a warning about the generated function names.

Funnily enough, it only seems to be coming through via rust-analyzer being run by my IDE (Zed), neither Clippy nor rustc seem to emit it.

image

Slapping in a #[allow(non_snake_case)] in the quote! block seems to quiet the warning, easily enough. :)

@bytedream
Copy link
Owner

Very interesting 🤔. My guess is that clippy and rustc ignores it because #[doc(hidden)] functions aren't meant to be "visible" in the first place?

@bytedream bytedream merged commit c020a6e into bytedream:main Sep 24, 2024
1 check passed
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