From 2c84c2d07af013006b8092c7303aa8c73f677fea Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 22 Dec 2020 19:18:45 +0300 Subject: Don't think that /submod.rs is /mod.rs --- crates/hir_def/src/nameres/mod_resolution.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_def/src') diff --git a/crates/hir_def/src/nameres/mod_resolution.rs b/crates/hir_def/src/nameres/mod_resolution.rs index b4ccd4488..af3262439 100644 --- a/crates/hir_def/src/nameres/mod_resolution.rs +++ b/crates/hir_def/src/nameres/mod_resolution.rs @@ -79,7 +79,7 @@ impl ModDir { for candidate in candidate_files.iter() { let path = AnchoredPath { anchor: file_id, path: candidate.as_str() }; if let Some(file_id) = db.resolve_path(path) { - let is_mod_rs = candidate.ends_with("mod.rs"); + let is_mod_rs = candidate.ends_with("/mod.rs"); let (dir_path, root_non_dir_owner) = if is_mod_rs || attr_path.is_some() { (DirPath::empty(), false) -- cgit v1.2.3