Unnamed repository; edit this file 'description' to name the repository.
reenable test
Jonas Schievink 2022-04-14
parent f5403ae · commit 72dcfe6
-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 4de4def2e8..ba5a47f4df 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]