properly restrict diagnostics to a single file
This commit is contained in:
parent
ec6f71576a
commit
fd30ec406b
@ -259,7 +259,12 @@ impl Module {
|
|||||||
for decl in self.declarations(db) {
|
for decl in self.declarations(db) {
|
||||||
match decl {
|
match decl {
|
||||||
crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
|
crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
|
||||||
crate::ModuleDef::Module(f) => f.diagnostics(db, sink),
|
crate::ModuleDef::Module(m) => {
|
||||||
|
// Only add diagnostics from inline modules
|
||||||
|
if let ModuleSource::Module(_) = m.definition_source(db).ast {
|
||||||
|
m.diagnostics(db, sink)
|
||||||
|
}
|
||||||
|
}
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user