-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
fix lint regression in non_upper_case_globals
#110575
Conversation
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.
Hm.. I think this is a bit too complicated for what it's worth.
Can you just revert your original PR, and just check the associate const's container similarly to how method_context
does to make sure that the NonSnakeCase
lint only fires on inherent methods?
a677d9e
to
4766d44
Compare
Cell
ify "last node" field on LateContext
non_upper_case_globals
@compiler-errors I reverted and re-implemented. I haven't fixed it for inherent associated types, would you like that in this PR or a followup? (note that it's an early lint so we'd need to convert it to |
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.
please squash this into one commit, and preferably (but I guess not required) fix the NonCamelCaseTypes
lint for associated types too?
4766d44
to
8cad917
Compare
@compiler-errors I've implemented your review comments. The inherent associated types part is too complex to do right now, unrelated parts of the lint stop working when I tried to make it a late lint. It is and unstable feature so we might just leave it as is for now? Also, sorry that this is taking so long; I only have access to my laptop right now. |
@bors r+ |
Rollup of 7 pull requests Successful merges: - rust-lang#102341 (Implement `Neg` for signed non-zero integers.) - rust-lang#110424 (Spelling misc) - rust-lang#110448 (cmp doc examples improvements) - rust-lang#110516 (bootstrap: Update linux-raw-sys to 0.3.2) - rust-lang#110548 (Make `impl Debug for Span` not panic on not having session globals.) - rust-lang#110554 (`deny(unsafe_op_in_unsafe_fn)` in `rustc_data_structures`) - rust-lang#110575 (fix lint regression in `non_upper_case_globals`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #110573
The issue also exists for inherent associated types (where I copied my impl from).
EarlyContext
is more involved to fix in this way, so I'll leave it be for now (note it's unstable so that's not urgent).r? @compiler-errors