diff options
Diffstat (limited to 'crates/ra_hir/src/nameres/tests/macros.rs')
-rw-r--r-- | crates/ra_hir/src/nameres/tests/macros.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_hir/src/nameres/tests/macros.rs b/crates/ra_hir/src/nameres/tests/macros.rs index a8ee0ba28..cfddf3029 100644 --- a/crates/ra_hir/src/nameres/tests/macros.rs +++ b/crates/ra_hir/src/nameres/tests/macros.rs | |||
@@ -140,6 +140,7 @@ fn unexpanded_macro_should_expand_by_fixedpoint_loop() { | |||
140 | 140 | ||
141 | #[test] | 141 | #[test] |
142 | fn macro_rules_from_other_crates_are_visible_with_macro_use() { | 142 | fn macro_rules_from_other_crates_are_visible_with_macro_use() { |
143 | covers!(macro_rules_from_other_crates_are_visible_with_macro_use); | ||
143 | let map = def_map_with_crate_graph( | 144 | let map = def_map_with_crate_graph( |
144 | " | 145 | " |
145 | //- /main.rs | 146 | //- /main.rs |
@@ -160,6 +161,13 @@ fn macro_rules_from_other_crates_are_visible_with_macro_use() { | |||
160 | $(struct $i { field: u32 } )* | 161 | $(struct $i { field: u32 } )* |
161 | } | 162 | } |
162 | } | 163 | } |
164 | |||
165 | mod priv_mod { | ||
166 | #[macro_export] | ||
167 | macro_rules! baz { | ||
168 | () => {}; | ||
169 | } | ||
170 | } | ||
163 | ", | 171 | ", |
164 | crate_graph! { | 172 | crate_graph! { |
165 | "main": ("/main.rs", ["foo"]), | 173 | "main": ("/main.rs", ["foo"]), |
@@ -171,6 +179,7 @@ fn macro_rules_from_other_crates_are_visible_with_macro_use() { | |||
171 | ⋮Bar: t v | 179 | ⋮Bar: t v |
172 | ⋮Foo: t v | 180 | ⋮Foo: t v |
173 | ⋮bar: t | 181 | ⋮bar: t |
182 | ⋮baz: m | ||
174 | ⋮foo: t | 183 | ⋮foo: t |
175 | ⋮structs: m | 184 | ⋮structs: m |
176 | ⋮ | 185 | ⋮ |
@@ -178,6 +187,7 @@ fn macro_rules_from_other_crates_are_visible_with_macro_use() { | |||
178 | ⋮Bar: t v | 187 | ⋮Bar: t v |
179 | ⋮Foo: t v | 188 | ⋮Foo: t v |
180 | ⋮bar: t | 189 | ⋮bar: t |
190 | ⋮baz: m | ||
181 | ⋮foo: t | 191 | ⋮foo: t |
182 | ⋮structs: m | 192 | ⋮structs: m |
183 | "###); | 193 | "###); |