diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-01 13:59:59 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-01 13:59:59 +0000 |
commit | 363718ba42d1eb906577a0a03c14248a0962a06a (patch) | |
tree | 9bb11467a2a4411218a36d2c61a59e844f3fdf01 /crates/ra_ide_api/src | |
parent | 5451bfb9a1c6482822bdd7883434b9230affd2ea (diff) | |
parent | c46be83a346eb2559420c2c880a52e7ce1787dde (diff) |
Merge #2147
2147: Fixes #2143 r=matklad a=kjeremy
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 1f3fa6c57..323faab33 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -316,6 +316,25 @@ mod tests { | |||
316 | } | 316 | } |
317 | 317 | ||
318 | #[test] | 318 | #[test] |
319 | fn goto_definition_works_for_macros_in_use_tree() { | ||
320 | check_goto( | ||
321 | " | ||
322 | //- /lib.rs | ||
323 | use foo::foo<|>; | ||
324 | |||
325 | //- /foo/lib.rs | ||
326 | #[macro_export] | ||
327 | macro_rules! foo { | ||
328 | () => { | ||
329 | {} | ||
330 | }; | ||
331 | } | ||
332 | ", | ||
333 | "foo MACRO_CALL FileId(2) [0; 66) [29; 32)", | ||
334 | ); | ||
335 | } | ||
336 | |||
337 | #[test] | ||
319 | fn goto_definition_works_for_methods() { | 338 | fn goto_definition_works_for_methods() { |
320 | covers!(goto_definition_works_for_methods); | 339 | covers!(goto_definition_works_for_methods); |
321 | check_goto( | 340 | check_goto( |