mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
more enterprisey diagnostics setup
This commit is contained in:
parent
7ee2887d1e
commit
c7ffd939f6
3 changed files with 75 additions and 59 deletions
|
@ -168,6 +168,22 @@ impl Module {
|
|||
|
||||
pub fn diagnostics(&self, db: &impl HirDatabase, sink: &mut DiagnosticSink) {
|
||||
db.crate_def_map(self.krate).add_diagnostics(db, self.module_id, sink);
|
||||
for decl in self.declarations(db) {
|
||||
match decl {
|
||||
crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
|
||||
crate::ModuleDef::Module(f) => f.diagnostics(db, sink),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
for impl_block in self.impl_blocks(db) {
|
||||
for item in impl_block.items(db) {
|
||||
match item {
|
||||
crate::ImplItem::Method(f) => f.diagnostics(db, sink),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn resolver(&self, db: &impl HirDatabase) -> Resolver {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue