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.
1 parent de6a5d2 commit f9c8046Copy full SHA for f9c8046
cpp_build/src/parser.rs
@@ -596,6 +596,19 @@ impl<'ast> Visit<'ast> for Parser {
596
.parse_mod(subdir)
597
.unwrap_or_else(|err| self.mod_error = Some(err));
598
}
599
+
600
+ let mut adjacent_subdir = self.current_path.clone();
601
+ if let Some(cur_mod_dir) = adjacent_subdir.file_stem().map(|x| x.to_owned()) {
602
+ adjacent_subdir.pop();
603
+ adjacent_subdir.push(cur_mod_dir);
604
+ adjacent_subdir.push(format!("{}.rs", mod_name));
605
+ if adjacent_subdir.is_file() {
606
+ return self
607
+ .parse_mod(adjacent_subdir)
608
+ .unwrap_or_else(|err| self.mod_error = Some(err));
609
+ }
610
611
612
let adjacent = self.mod_dir.join(&format!("{}.rs", mod_name));
613
if adjacent.is_file() {
614
return self
0 commit comments