diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-23 22:16:50 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-23 22:16:50 +0100 |
commit | a71d0ecd774008bbfe8cb2215ffa6dedd5024877 (patch) | |
tree | a14b7ac27dad547fd5832d29a785f01cbba2da91 /crates/ra_ide_api/src/lib.rs | |
parent | a094d5c621e44ff78dce953c0cae7cfba4b2840e (diff) | |
parent | 9d25e5dea4a24272bd891c68e02309cc69792a07 (diff) |
Merge #1201
1201: Goto Type Definition for ADTs r=matklad a=kjeremy
Very basic go to type definition
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index d25795adc..d4be8bd6c 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -19,6 +19,7 @@ mod status; | |||
19 | mod completion; | 19 | mod completion; |
20 | mod runnables; | 20 | mod runnables; |
21 | mod goto_definition; | 21 | mod goto_definition; |
22 | mod goto_type_definition; | ||
22 | mod extend_selection; | 23 | mod extend_selection; |
23 | mod hover; | 24 | mod hover; |
24 | mod call_info; | 25 | mod call_info; |
@@ -416,6 +417,13 @@ impl Analysis { | |||
416 | self.with_db(|db| impls::goto_implementation(db, position)) | 417 | self.with_db(|db| impls::goto_implementation(db, position)) |
417 | } | 418 | } |
418 | 419 | ||
420 | pub fn goto_type_definition( | ||
421 | &self, | ||
422 | position: FilePosition, | ||
423 | ) -> Cancelable<Option<RangeInfo<Vec<NavigationTarget>>>> { | ||
424 | self.with_db(|db| goto_type_definition::goto_type_definition(db, position)) | ||
425 | } | ||
426 | |||
419 | /// Finds all usages of the reference at point. | 427 | /// Finds all usages of the reference at point. |
420 | pub fn find_all_refs( | 428 | pub fn find_all_refs( |
421 | &self, | 429 | &self, |