mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Merge #702
702: Go to Implementation r=matklad a=kjeremy First half of #620 Co-authored-by: Jeremy Kolb <kjeremy@gmail.com> Co-authored-by: kjeremy <kjeremy@gmail.com>
This commit is contained in:
commit
b704ce803b
14 changed files with 277 additions and 17 deletions
|
@ -25,6 +25,7 @@ mod call_info;
|
|||
mod syntax_highlighting;
|
||||
mod parent_module;
|
||||
mod rename;
|
||||
mod impls;
|
||||
|
||||
#[cfg(test)]
|
||||
mod marks;
|
||||
|
@ -416,6 +417,13 @@ impl Analysis {
|
|||
self.with_db(|db| goto_definition::goto_definition(db, position))
|
||||
}
|
||||
|
||||
pub fn goto_implementation(
|
||||
&self,
|
||||
position: FilePosition,
|
||||
) -> Cancelable<Option<RangeInfo<Vec<NavigationTarget>>>> {
|
||||
self.with_db(|db| impls::goto_implementation(db, position))
|
||||
}
|
||||
|
||||
/// Finds all usages of the reference at point.
|
||||
pub fn find_all_refs(&self, position: FilePosition) -> Cancelable<Vec<(FileId, TextRange)>> {
|
||||
self.with_db(|db| db.find_all_refs(position))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue