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:
bors[bot] 2019-01-30 19:19:31 +00:00
commit b704ce803b
14 changed files with 277 additions and 17 deletions

View file

@ -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))