aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorJosh Mcguigan <[email protected]>2020-03-11 02:58:17 +0000
committerJosh Mcguigan <[email protected]>2020-03-13 00:16:28 +0000
commit7208498d54b9f3d386b58f901c911a35170057ce (patch)
treea2af022a5b52794e9deacfca24b77b3a1e980336 /crates/ra_hir_def
parent05b4fc6d79060fc3120f92b01119e3a851c37829 (diff)
fix issue 3444
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/src/nameres/tests.rs22
1 files changed, 22 insertions, 0 deletions
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
@@ -102,6 +102,28 @@ fn crate_def_map_super_super() {
102} 102}
103 103
104#[test] 104#[test]
105fn crate_def_map_fn_mod_same_name() {
106 let map = def_map(
107 "
108 //- /lib.rs
109 mod m {
110 pub mod z {}
111 pub fn z() {}
112 }
113 ",
114 );
115 assert_snapshot!(map, @r###"
116 ⋮crate
117 ⋮m: t
118
119 ⋮crate::m
120 ⋮z: t v
121
122 ⋮crate::m::z
123 "###)
124}
125
126#[test]
105fn bogus_paths() { 127fn bogus_paths() {
106 covers!(bogus_paths); 128 covers!(bogus_paths);
107 let map = def_map( 129 let map = def_map(