aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/lib.rs
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-02-17 11:38:32 +0000
committerVille Penttinen <[email protected]>2019-02-17 11:40:43 +0000
commit85a6bf342490f2a8be34ea53af9eb8fcdcad2b38 (patch)
tree5b13e54271aa80330fcbcd48162ede090211629e /crates/ra_ide_api/src/lib.rs
parentedd4c1d8a6c270fe39ae881c23c722c658c87c32 (diff)
Refactor find_all_refs to return ReferenceSearchResult
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r--crates/ra_ide_api/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs
index 1746b58ae..57a490fa7 100644
--- a/crates/ra_ide_api/src/lib.rs
+++ b/crates/ra_ide_api/src/lib.rs
@@ -56,6 +56,7 @@ pub use crate::{
56 completion::{CompletionItem, CompletionItemKind, InsertTextFormat}, 56 completion::{CompletionItem, CompletionItemKind, InsertTextFormat},
57 runnables::{Runnable, RunnableKind}, 57 runnables::{Runnable, RunnableKind},
58 navigation_target::NavigationTarget, 58 navigation_target::NavigationTarget,
59 references::ReferenceSearchResult,
59}; 60};
60pub use ra_ide_api_light::{ 61pub use ra_ide_api_light::{
61 Fold, FoldKind, HighlightedRange, Severity, StructureNode, LocalEdit, 62 Fold, FoldKind, HighlightedRange, Severity, StructureNode, LocalEdit,
@@ -319,7 +320,10 @@ impl Analysis {
319 } 320 }
320 321
321 /// Finds all usages of the reference at point. 322 /// Finds all usages of the reference at point.
322 pub fn find_all_refs(&self, position: FilePosition) -> Cancelable<Vec<(FileId, TextRange)>> { 323 pub fn find_all_refs(
324 &self,
325 position: FilePosition,
326 ) -> Cancelable<Option<ReferenceSearchResult>> {
323 self.with_db(|db| references::find_all_refs(db, position)) 327 self.with_db(|db| references::find_all_refs(db, position))
324 } 328 }
325 329