mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Go to Implementation for structs and enums
This commit is contained in:
parent
48d2acb297
commit
3c17643b30
14 changed files with 279 additions and 18 deletions
|
@ -25,6 +25,7 @@ mod call_info;
|
|||
mod syntax_highlighting;
|
||||
mod parent_module;
|
||||
mod rename;
|
||||
mod impls;
|
||||
|
||||
#[cfg(test)]
|
||||
mod marks;
|
||||
|
@ -415,6 +416,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