aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-03-18 16:23:51 +0000
committerJonas Schievink <[email protected]>2021-03-18 16:24:17 +0000
commit4390125314fc1895035894ea34cecc3449d40f16 (patch)
tree04e614060d4070c84da063b82b11498c125d50a2
parentd5eb17ade594ca23e2e7db91ee7c28d7246f3c80 (diff)
Add test for goto def on proc macro invocation
-rw-r--r--crates/ide/src/goto_definition.rs17
1 files changed, 17 insertions, 0 deletions
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: }; }
1176"#, 1176"#,
1177 ) 1177 )
1178 } 1178 }
1179
1180 #[test]
1181 fn goto_proc_macro() {
1182 check(
1183 r#"
1184//- /main.rs crate:main deps:mac
1185use mac::fn_macro;
1186
1187fn_macro$0!();
1188
1189//- /mac.rs crate:mac
1190#[proc_macro]
1191fn fn_macro() {}
1192 //^^^^^^^^
1193 "#,
1194 )
1195 }
1179} 1196}