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.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs
index 9192f66e8..4fa6750aa 100644
--- a/crates/ra_analysis/src/lib.rs
+++ b/crates/ra_analysis/src/lib.rs
@@ -273,6 +273,14 @@ impl<T> RangeInfo<T> {
273 } 273 }
274} 274}
275 275
276#[derive(Debug)]
277pub struct CallInfo {
278 pub label: String,
279 pub doc: Option<String>,
280 pub parameters: Vec<String>,
281 pub active_parameter: Option<usize>,
282}
283
276/// `AnalysisHost` stores the current state of the world. 284/// `AnalysisHost` stores the current state of the world.
277#[derive(Debug, Default)] 285#[derive(Debug, Default)]
278pub struct AnalysisHost { 286pub struct AnalysisHost {
@@ -393,10 +401,7 @@ impl Analysis {
393 hover::hover(&*self.db, position) 401 hover::hover(&*self.db, position)
394 } 402 }
395 /// Computes parameter information for the given call expression. 403 /// Computes parameter information for the given call expression.
396 pub fn call_info( 404 pub fn call_info(&self, position: FilePosition) -> Cancelable<Option<CallInfo>> {
397 &self,
398 position: FilePosition,
399 ) -> Cancelable<Option<(FnSignatureInfo, Option<usize>)>> {
400 call_info::call_info(&*self.db, position) 405 call_info::call_info(&*self.db, position)
401 } 406 }
402 /// Returns a `mod name;` declaration which created the current module. 407 /// Returns a `mod name;` declaration which created the current module.