]> git.lizzy.rs Git - rust.git/commitdiff
reenable test
authorJonas Schievink <jonas.schievink@ferrous-systems.com>
Thu, 14 Apr 2022 11:02:20 +0000 (13:02 +0200)
committerJonas Schievink <jonas.schievink@ferrous-systems.com>
Thu, 14 Apr 2022 11:02:20 +0000 (13:02 +0200)
crates/ide_assists/src/handlers/expand_glob_import.rs

index 4de4def2e86b33e4a029c23b3be5a39ab7320f0c..ba5a47f4df86b69d512caea0c3cab4b0bec351f8 100644 (file)
@@ -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]