From 7208498d54b9f3d386b58f901c911a35170057ce Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Tue, 10 Mar 2020 19:58:17 -0700 Subject: fix issue 3444 --- crates/ra_hir_def/src/nameres/tests.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'crates/ra_hir_def/src') diff --git a/crates/ra_hir_def/src/nameres/tests.rs b/crates/ra_hir_def/src/nameres/tests.rs index dda5ed699..3f33a75b9 100644 --- a/crates/ra_hir_def/src/nameres/tests.rs +++ b/crates/ra_hir_def/src/nameres/tests.rs @@ -101,6 +101,28 @@ fn crate_def_map_super_super() { "###) } +#[test] +fn crate_def_map_fn_mod_same_name() { + let map = def_map( + " + //- /lib.rs + mod m { + pub mod z {} + pub fn z() {} + } + ", + ); + assert_snapshot!(map, @r###" + ⋮crate + ⋮m: t + ⋮ + ⋮crate::m + ⋮z: t v + ⋮ + ⋮crate::m::z + "###) +} + #[test] fn bogus_paths() { covers!(bogus_paths); -- cgit v1.2.3