mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Prevent multiple incorrect case diagnostics in functions
This commit is contained in:
parent
3d5d21b602
commit
bfae2634b4
2 changed files with 16 additions and 3 deletions
|
@ -374,8 +374,6 @@ impl Module {
|
|||
let crate_def_map = db.crate_def_map(self.id.krate);
|
||||
crate_def_map.add_diagnostics(db.upcast(), self.id.local_id, sink);
|
||||
for decl in self.declarations(db) {
|
||||
decl.diagnostics(db, sink);
|
||||
|
||||
match decl {
|
||||
crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
|
||||
crate::ModuleDef::Module(m) => {
|
||||
|
@ -384,7 +382,9 @@ impl Module {
|
|||
m.diagnostics(db, sink)
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
_ => {
|
||||
decl.diagnostics(db, sink);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue