From b00a4d43ecd4af49a2870718a9d5b8d49084a285 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 28 Aug 2018 20:29:36 +0300 Subject: Dont diagnose inline mods --- crates/libanalysis/src/module_map.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/libanalysis/src') 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 { } 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"; -- cgit v1.2.3