From a66214b34effe1ad7f4351a1b920cf3a8f98d3c0 Mon Sep 17 00:00:00 2001 From: uHOOCCOOHu Date: Mon, 2 Sep 2019 14:36:20 +0800 Subject: Fix import strategy of `macro_use` and its test --- crates/ra_hir/src/nameres/tests/macros.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/ra_hir/src/nameres/tests') 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() { #[test] fn macro_rules_from_other_crates_are_visible_with_macro_use() { + covers!(macro_rules_from_other_crates_are_visible_with_macro_use); let map = def_map_with_crate_graph( " //- /main.rs @@ -160,6 +161,13 @@ fn macro_rules_from_other_crates_are_visible_with_macro_use() { $(struct $i { field: u32 } )* } } + + mod priv_mod { + #[macro_export] + macro_rules! baz { + () => {}; + } + } ", crate_graph! { "main": ("/main.rs", ["foo"]), @@ -171,6 +179,7 @@ fn macro_rules_from_other_crates_are_visible_with_macro_use() { ⋮Bar: t v ⋮Foo: t v ⋮bar: t + ⋮baz: m ⋮foo: t ⋮structs: m ⋮ @@ -178,6 +187,7 @@ fn macro_rules_from_other_crates_are_visible_with_macro_use() { ⋮Bar: t v ⋮Foo: t v ⋮bar: t + ⋮baz: m ⋮foo: t ⋮structs: m "###); -- cgit v1.2.3