aboutsummaryrefslogtreecommitdiff
path: root/crates/libanalysis/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-28 18:29:36 +0100
committerAleksey Kladov <[email protected]>2018-08-28 18:29:36 +0100
commitb00a4d43ecd4af49a2870718a9d5b8d49084a285 (patch)
tree865f970d2d409bd17566d32a6b5e33eefa27ffe8 /crates/libanalysis/src
parent4c1f17af7d0085636434a8bc85e62434eb128516 (diff)
Dont diagnose inline mods
Diffstat (limited to 'crates/libanalysis/src')
-rw-r--r--crates/libanalysis/src/module_map.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/libanalysis/src/module_map.rs b/crates/libanalysis/src/module_map.rs
index b65569c46..47c0018e1 100644
--- a/crates/libanalysis/src/module_map.rs
+++ b/crates/libanalysis/src/module_map.rs
@@ -220,6 +220,12 @@ impl Link {
220 } 220 }
221 221
222 fn resolve(&mut self, file_resolver: &FileResolver) { 222 fn resolve(&mut self, file_resolver: &FileResolver) {
223 if !self.ast().has_semi() {
224 self.problem = None;
225 self.points_to = Vec::new();
226 return;
227 }
228
223 let mod_name = file_resolver.file_stem(self.owner.0); 229 let mod_name = file_resolver.file_stem(self.owner.0);
224 let is_dir_owner = 230 let is_dir_owner =
225 mod_name == "mod" || mod_name == "lib" || mod_name == "main"; 231 mod_name == "mod" || mod_name == "lib" || mod_name == "main";