We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents feae74e + fd30ec4 commit 3775e5eCopy full SHA for 3775e5e
crates/ra_hir/src/code_model.rs
@@ -259,7 +259,12 @@ impl Module {
259
for decl in self.declarations(db) {
260
match decl {
261
crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
262
- crate::ModuleDef::Module(f) => f.diagnostics(db, sink),
+ crate::ModuleDef::Module(m) => {
263
+ // Only add diagnostics from inline modules
264
+ if let ModuleSource::Module(_) = m.definition_source(db).ast {
265
+ m.diagnostics(db, sink)
266
+ }
267
268
_ => (),
269
}
270
0 commit comments