mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
fix: Diagnose everything in nested items, not just def diagnostics
This commit is contained in:
parent
723d799ec1
commit
498f39eae2
4 changed files with 22 additions and 33 deletions
|
@ -599,12 +599,12 @@ fn main() {
|
|||
//^^^ 💡 warn: Static variable `bar` should have UPPER_SNAKE_CASE name, e.g. `BAR`
|
||||
fn BAZ() {
|
||||
//^^^ 💡 warn: Function `BAZ` should have snake_case name, e.g. `baz`
|
||||
let INNER_INNER = 42;
|
||||
//^^^^^^^^^^^ 💡 warn: Variable `INNER_INNER` should have snake_case name, e.g. `inner_inner`
|
||||
let _INNER_INNER = 42;
|
||||
//^^^^^^^^^^^^ 💡 warn: Variable `_INNER_INNER` should have snake_case name, e.g. `_inner_inner`
|
||||
}
|
||||
|
||||
let INNER_LOCAL = 42;
|
||||
//^^^^^^^^^^^ 💡 warn: Variable `INNER_LOCAL` should have snake_case name, e.g. `inner_local`
|
||||
let _INNER_LOCAL = 42;
|
||||
//^^^^^^^^^^^^ 💡 warn: Variable `_INNER_LOCAL` should have snake_case name, e.g. `_inner_local`
|
||||
}
|
||||
}
|
||||
"#,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue