-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Lint against lowercase static mut #37162
Conversation
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
99fb4fe
to
bfe267a
Compare
5147918
to
6f216f6
Compare
6f216f6
to
72399f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! r=me with the comment addressed.
hir::ItemStatic(_, hir::MutImmutable, _) => { | ||
NonUpperCaseGlobals::check_upper_case(cx, "static constant", it.name, it.span); | ||
} | ||
hir::ItemStatic(_, hir::MutMutable, _) => { | ||
NonUpperCaseGlobals::check_upper_case(cx, "static variable", it.name, it.span); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the above two arms could be merged into a single arm:
hir::ItemStatic(..) => {
NonUpperCaseGlobals::check_upper_case(cx, "static variable", it.name, it.span);
}
@bors r+ |
📌 Commit 066d62d has been approved by |
This may produce new warnings. Should the relnotes label be applied? |
Yeah, let's tag |
Closes #37145.
Lint for non mut statics was added in #7523, and it explicitly did not cover mut statics. I am not sure why.