diff options
author | Jeremy Kolb <[email protected]> | 2019-01-22 13:55:05 +0000 |
---|---|---|
committer | Jeremy Kolb <[email protected]> | 2019-01-22 13:55:05 +0000 |
commit | b5404514834a27c682dc22d86bc5585c0cae3076 (patch) | |
tree | 38c6f5d9abb55d335894a69e2db3f6df31573dcf /crates/ra_ide_api | |
parent | b77d780f0e9e7902695b949a25588fcb66bb5982 (diff) |
Move docs to Function
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_item.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index dfaadbb20..d70c36889 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs | |||
@@ -259,9 +259,8 @@ impl Builder { | |||
259 | } | 259 | } |
260 | self.insert_text_format = InsertTextFormat::Snippet; | 260 | self.insert_text_format = InsertTextFormat::Snippet; |
261 | } | 261 | } |
262 | let sig = function.signature(ctx.db); | 262 | if let Some(docs) = function.docs(ctx.db) { |
263 | if !sig.documentation().is_empty() { | 263 | self.documentation = Some(docs); |
264 | self.documentation = Some(sig.documentation().clone()); | ||
265 | } | 264 | } |
266 | 265 | ||
267 | self.kind = Some(CompletionItemKind::Function); | 266 | self.kind = Some(CompletionItemKind::Function); |