From 4390125314fc1895035894ea34cecc3449d40f16 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 18 Mar 2021 17:23:51 +0100 Subject: Add test for goto def on proc macro invocation --- crates/ide/src/goto_definition.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crates') diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs index 598b47e41..473d48c2f 100644 --- a/crates/ide/src/goto_definition.rs +++ b/crates/ide/src/goto_definition.rs @@ -1176,4 +1176,21 @@ fn foo() { A { a$0: }; } "#, ) } + + #[test] + fn goto_proc_macro() { + check( + r#" +//- /main.rs crate:main deps:mac +use mac::fn_macro; + +fn_macro$0!(); + +//- /mac.rs crate:mac +#[proc_macro] +fn fn_macro() {} + //^^^^^^^^ + "#, + ) + } } -- cgit v1.2.3