aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/call_info.rs21
1 files changed, 11 insertions, 10 deletions
diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs
index a65119315..3c53bd11a 100644
--- a/crates/ra_ide_api/src/call_info.rs
+++ b/crates/ra_ide_api/src/call_info.rs
@@ -118,16 +118,6 @@ impl CallInfo {
118 fn parameters(&self) -> &[String] { 118 fn parameters(&self) -> &[String] {
119 &self.signature.parameters 119 &self.signature.parameters
120 } 120 }
121
122 #[cfg(test)]
123 fn doc(&self) -> Option<&hir::Documentation> {
124 self.signature.doc.as_ref()
125 }
126
127 #[cfg(test)]
128 fn label(&self) -> String {
129 self.signature.to_string()
130 }
131} 121}
132 122
133#[cfg(test)] 123#[cfg(test)]
@@ -138,6 +128,17 @@ mod tests {
138 128
139 use super::*; 129 use super::*;
140 130
131 // These are only used when testing
132 impl CallInfo {
133 fn doc(&self) -> Option<hir::Documentation> {
134 self.signature.doc.clone()
135 }
136
137 fn label(&self) -> String {
138 self.signature.to_string()
139 }
140 }
141
141 fn call_info(text: &str) -> CallInfo { 142 fn call_info(text: &str) -> CallInfo {
142 let (analysis, position) = single_file_with_position(text); 143 let (analysis, position) = single_file_with_position(text);
143 analysis.call_info(position).unwrap().unwrap() 144 analysis.call_info(position).unwrap().unwrap()