about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Schievink <jonas.schievink@ferrous-systems.com>2022-04-14 13:02:20 +0200
committerJonas Schievink <jonas.schievink@ferrous-systems.com>2022-04-14 13:02:20 +0200
commit72dcfe6cc624c978cdf796ff27406bf468395edb (patch)
treee1266edecf4f1f28eb5e8ae7cfd1f422aeb379dc
parentf5403aef9686c8d5337ac2aae99b2da54646143c (diff)
downloadrust-72dcfe6cc624c978cdf796ff27406bf468395edb.tar.gz
rust-72dcfe6cc624c978cdf796ff27406bf468395edb.zip
reenable test
-rw-r--r--crates/ide_assists/src/handlers/expand_glob_import.rs59
1 files changed, 28 insertions, 31 deletions
diff --git a/crates/ide_assists/src/handlers/expand_glob_import.rs b/crates/ide_assists/src/handlers/expand_glob_import.rs
index 4de4def2e86..ba5a47f4df8 100644
--- a/crates/ide_assists/src/handlers/expand_glob_import.rs
+++ b/crates/ide_assists/src/handlers/expand_glob_import.rs
@@ -723,37 +723,34 @@ fn qux(bar: Bar, baz: Baz) {
 
     #[test]
     fn expanding_glob_import_with_macro_defs() {
-        // FIXME: this is currently fails because `Definition::find_usages` ignores macros
-        //       https://github.com/rust-analyzer/rust-analyzer/issues/3484
-        //
-        //         check_assist(
-        //             expand_glob_import,
-        //             r"
-        // //- /lib.rs crate:foo
-        // #[macro_export]
-        // macro_rules! bar {
-        //     () => ()
-        // }
-
-        // pub fn baz() {}
-
-        // //- /main.rs crate:main deps:foo
-        // use foo::*$0;
-
-        // fn main() {
-        //     bar!();
-        //     baz();
-        // }
-        // ",
-        //             r"
-        // use foo::{bar, baz};
-
-        // fn main() {
-        //     bar!();
-        //     baz();
-        // }
-        // ",
-        //         )
+        check_assist(
+            expand_glob_import,
+            r#"
+//- /lib.rs crate:foo
+#[macro_export]
+macro_rules! bar {
+    () => ()
+}
+
+pub fn baz() {}
+
+//- /main.rs crate:main deps:foo
+use foo::*$0;
+
+fn main() {
+    bar!();
+    baz();
+}
+"#,
+            r#"
+use foo::{bar, baz};
+
+fn main() {
+    bar!();
+    baz();
+}
+"#,
+        );
     }
 
     #[test]