aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
authorBenjamin Coenen <[email protected]>2020-05-01 15:26:22 +0100
committerBenjamin Coenen <[email protected]>2020-05-01 15:26:22 +0100
commit19e28888aa41b2845b47adb7314aed99d3c48679 (patch)
tree3ac50d956f87940df33fce9b9aa38ecc2b8b6780 /crates/ra_ide/src
parentc3c7edb9bc3f2860686383dc1498c988a56859e8 (diff)
wip
Signed-off-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/goto_definition.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs
index 1dfca819d..31f567541 100644
--- a/crates/ra_ide/src/goto_definition.rs
+++ b/crates/ra_ide/src/goto_definition.rs
@@ -244,6 +244,24 @@ mod tests {
244 } 244 }
245 245
246 #[test] 246 #[test]
247 fn goto_def_for_use_alias() {
248 covers!(ra_ide_db::goto_def_for_use_alias);
249 check_goto(
250 "
251 //- /lib.rs
252 use foo as <|>bar;
253
254
255 //- /foo/lib.rs
256 #[macro_export]
257 macro_rules! foo { () => { () } }
258 ",
259 "foo MACRO_CALL FileId(2) 0..49 29..32",
260 "#[macro_export]\nmacro_rules! foo { () => { () } }|foo",
261 );
262 }
263
264 #[test]
247 fn goto_def_for_macros_in_use_tree() { 265 fn goto_def_for_macros_in_use_tree() {
248 check_goto( 266 check_goto(
249 " 267 "