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(non_uppercase_statics)] inside bitflags! macro makes it incompatible with modules which forbid the same. #17773

Closed
jakerr opened this issue Oct 4, 2014 · 2 comments · Fixed by #17781
Labels
A-syntaxext Area: Syntax extensions

Comments

@jakerr
Copy link
Contributor

jakerr commented Oct 4, 2014

94bcd35 added #[allow(non_uppercase_statics)] into the bitflags! generated code. It means using bitflags! from within a module that has #![forbid(non_uppercase_statics)] no longer works.

I don't think the generated statics should have allow added to them in this blanket fashion. Shouldn't it be up to the person calling the macro to allow if they need to for their particular case?

See: rust-xml/issues/13 - Forbidding non uppercase statics causes build to fail

@jakerr
Copy link
Contributor Author

jakerr commented Oct 4, 2014

cc: @P1Start

@ftxqxd
Copy link
Contributor

ftxqxd commented Oct 4, 2014

Er, whoops; I think you’re right. This should definitely only be marked #[allow] at use sites. I’ll submit a PR as soon as I get the tests to pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants