diff options
author | Jeremy Kolb <[email protected]> | 2019-01-22 02:42:37 +0000 |
---|---|---|
committer | Jeremy Kolb <[email protected]> | 2019-01-22 02:42:37 +0000 |
commit | b77d780f0e9e7902695b949a25588fcb66bb5982 (patch) | |
tree | 3f2cde5aafd881efaf2c6da1b2811cbb173b8ed9 /crates/ra_hir/src/code_model_impl | |
parent | 5d110c0ee2ec50009eb7c552888a73ce8380d34a (diff) |
Thread documentation through FnSignature and CompletionItem
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs index 66d7e1713..c848f7a82 100644 --- a/crates/ra_hir/src/code_model_impl/function.rs +++ b/crates/ra_hir/src/code_model_impl/function.rs | |||
@@ -2,7 +2,7 @@ mod scope; | |||
2 | 2 | ||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use ra_syntax::{TreeArc, ast::{self, NameOwner}}; | 5 | use ra_syntax::{TreeArc, ast::{self, NameOwner, DocCommentsOwner}}; |
6 | 6 | ||
7 | use crate::{ | 7 | use crate::{ |
8 | DefId, HirDatabase, Name, AsName, Function, FnSignature, Module, | 8 | DefId, HirDatabase, Name, AsName, Function, FnSignature, Module, |
@@ -72,11 +72,15 @@ impl FnSignature { | |||
72 | } else { | 72 | } else { |
73 | TypeRef::unit() | 73 | TypeRef::unit() |
74 | }; | 74 | }; |
75 | |||
76 | let comments = node.doc_comment_text(); | ||
77 | |||
75 | let sig = FnSignature { | 78 | let sig = FnSignature { |
76 | name, | 79 | name, |
77 | params, | 80 | params, |
78 | ret_type, | 81 | ret_type, |
79 | has_self_param, | 82 | has_self_param, |
83 | documentation: comments, | ||
80 | }; | 84 | }; |
81 | Arc::new(sig) | 85 | Arc::new(sig) |
82 | } | 86 | } |