You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression in non_upper_case_globals lint level attribute on associated item #110573
$ cargo +nightly-2023-04-19 check Finished dev [unoptimized + debuginfo] target(s) in 0.01s
$ cargo +nightly-2023-04-20 checkerror: associated constant `Const` should have an upper case name --> src/main.rs:7:15 |7 | pub const Const: () = (); | ^^^^^ help: convert the identifier to upper case: `CONST` |note: the lint level is defined here --> src/main.rs:1:9 |1 | #![deny(warnings)] | ^^^^^^^^ = note: `#[deny(non_upper_case_globals)]` implied by `#[deny(warnings)]`
I believe the old behavior from nightly-2023-04-19 is correct.
The repro has nothing to do with trait impls so I believe #110513 was not supposed to have affected it.
Probably something to do with the hygeine of the span on the ImplItemRef versus the ImplItem. @Ezrashaw if you can't fix this then ping me and I'll look at it, but we probably should fix it sooner than later.
I was thinking that it's because we aren't checking the lint level for each of the items within the impl. Just the impl itself. Actually, you're probably right.
Activity
dtolnay commentedon Apr 20, 2023
Bisects to #110513. @Ezrashaw @compiler-errors
Ezrashaw commentedon Apr 20, 2023
How on earth did that happen? It was like a five-line change. 😆
EDIT: got a fix, will post soon.
Suppress buggy non_upper_case_globals warning
compiler-errors commentedon Apr 20, 2023
Probably something to do with the hygeine of the span on the
ImplItemRefversus theImplItem. @Ezrashaw if you can't fix this then ping me and I'll look at it, but we probably should fix it sooner than later.Ezrashaw commentedon Apr 20, 2023
I was thinking that it's because we aren't checking the lint level for each of the items within the impl. Just the impl itself.Actually, you're probably right.compiler-errors commentedon Apr 20, 2023
Oh, no, that's not it. You're missing a call to
with_lint_attrsin the visitor.Rollup merge of rust-lang#110575 - Ezrashaw:fix-regression-110573, r=…