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

Support allow non_upper_case_globals lint. #198

Closed
crlf0710 opened this issue Oct 27, 2019 · 3 comments · Fixed by #281
Closed

Support allow non_upper_case_globals lint. #198

crlf0710 opened this issue Oct 27, 2019 · 3 comments · Fixed by #281

Comments

@crlf0710
Copy link

I'm trying to create a bitflags with CamelCase naming. However adding #[allow(non_upper_case_globals)] everywhere doesn't suppress the lints.

@binarycrusader
Copy link

This is my only disappointment with bitflags; I know that technically the macro isn't generating an enum, but bit flags are frequently defined as enums in C/C++, and it's natural to prefer enum variant casing rules for the bitflags here.

@MagicRB
Copy link

MagicRB commented Mar 20, 2020

When creating ffi bindings to c/c++ libs it gets especially annoying, having to have your bitflag variant named ANY_MODIFIER as opposed to AnyModifier to get rid of those warning is really annoying...

@hexagon-chunt-ricb
Copy link

@KodrAus How does #281 fix this issue? The #[allow(non_upper_case_globals)] lint still doesn't work anywhere, the only way to get it to work is to use #![allow(non_upper_case_globals)] for the entire file. Did I miss the solution?

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.

4 participants