mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Dont diagnose inline mods
This commit is contained in:
parent
4c1f17af7d
commit
b00a4d43ec
2 changed files with 19 additions and 0 deletions
|
@ -220,6 +220,12 @@ impl Link {
|
|||
}
|
||||
|
||||
fn resolve(&mut self, file_resolver: &FileResolver) {
|
||||
if !self.ast().has_semi() {
|
||||
self.problem = None;
|
||||
self.points_to = Vec::new();
|
||||
return;
|
||||
}
|
||||
|
||||
let mod_name = file_resolver.file_stem(self.owner.0);
|
||||
let is_dir_owner =
|
||||
mod_name == "mod" || mod_name == "lib" || mod_name == "main";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue