aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r--crates/ra_analysis/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs
index 8595d7e03..6ce32894a 100644
--- a/crates/ra_analysis/src/lib.rs
+++ b/crates/ra_analysis/src/lib.rs
@@ -37,7 +37,7 @@ pub use ra_editor::{
37 RunnableKind, StructureNode, 37 RunnableKind, StructureNode,
38}; 38};
39 39
40#[derive(Clone, Copy, Debug)] 40#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
41pub struct Cancel; 41pub struct Cancel;
42 42
43pub type Cancelable<T> = Result<T, Cancel>; 43pub type Cancelable<T> = Result<T, Cancel>;
@@ -231,8 +231,8 @@ impl Analysis {
231 file_id: FileId, 231 file_id: FileId,
232 offset: TextUnit 232 offset: TextUnit
233 ) -> Cancelable<Vec<(FileId, FileSymbol)>> { 233 ) -> Cancelable<Vec<(FileId, FileSymbol)>> {
234 Ok(self.imp 234 self.imp
235 .approximately_resolve_symbol(file_id, offset)) 235 .approximately_resolve_symbol(file_id, offset)
236 } 236 }
237 pub fn find_all_refs(&self, file_id: FileId, offset: TextUnit, ) -> Cancelable<Vec<(FileId, TextRange)>> { 237 pub fn find_all_refs(&self, file_id: FileId, offset: TextUnit, ) -> Cancelable<Vec<(FileId, TextRange)>> {
238 Ok(self.imp.find_all_refs(file_id, offset)) 238 Ok(self.imp.find_all_refs(file_id, offset))
@@ -241,7 +241,7 @@ impl Analysis {
241 self.imp.parent_module(file_id) 241 self.imp.parent_module(file_id)
242 } 242 }
243 pub fn crate_for(&self, file_id: FileId) -> Cancelable<Vec<CrateId>> { 243 pub fn crate_for(&self, file_id: FileId) -> Cancelable<Vec<CrateId>> {
244 Ok(self.imp.crate_for(file_id)) 244 self.imp.crate_for(file_id)
245 } 245 }
246 pub fn crate_root(&self, crate_id: CrateId) -> Cancelable<FileId> { 246 pub fn crate_root(&self, crate_id: CrateId) -> Cancelable<FileId> {
247 Ok(self.imp.crate_root(crate_id)) 247 Ok(self.imp.crate_root(crate_id))
@@ -262,7 +262,7 @@ impl Analysis {
262 Ok(self.imp.assists(file_id, range)) 262 Ok(self.imp.assists(file_id, range))
263 } 263 }
264 pub fn diagnostics(&self, file_id: FileId) -> Cancelable<Vec<Diagnostic>> { 264 pub fn diagnostics(&self, file_id: FileId) -> Cancelable<Vec<Diagnostic>> {
265 Ok(self.imp.diagnostics(file_id)) 265 self.imp.diagnostics(file_id)
266 } 266 }
267 pub fn resolve_callable( 267 pub fn resolve_callable(
268 &self, 268 &self,