aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/completion_item.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_item.rs')
-rw-r--r--crates/ra_ide_api/src/completion/completion_item.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs
index d707a84ef..334449fae 100644
--- a/crates/ra_ide_api/src/completion/completion_item.rs
+++ b/crates/ra_ide_api/src/completion/completion_item.rs
@@ -126,8 +126,12 @@ impl Builder {
126 self.kind = Some(kind); 126 self.kind = Some(kind);
127 self 127 self
128 } 128 }
129 pub(crate) fn detail(mut self, detail: impl Into<String>) -> Builder { 129 #[allow(unused)]
130 self.detail = Some(detail.into()); 130 pub(crate) fn detail(self, detail: impl Into<String>) -> Builder {
131 self.set_detail(Some(detail))
132 }
133 pub(crate) fn set_detail(mut self, detail: Option<impl Into<String>>) -> Builder {
134 self.detail = detail.map(Into::into);
131 self 135 self
132 } 136 }
133 pub(super) fn from_resolution( 137 pub(super) fn from_resolution(
@@ -239,6 +243,9 @@ impl Completions {
239 } else { 243 } else {
240 res.push_str(&c.label); 244 res.push_str(&c.label);
241 } 245 }
246 if let Some(detail) = &c.detail {
247 res.push_str(&format!(" {:?}", detail));
248 }
242 if let Some(snippet) = &c.snippet { 249 if let Some(snippet) = &c.snippet {
243 res.push_str(&format!(" {:?}", snippet)); 250 res.push_str(&format!(" {:?}", snippet));
244 } 251 }