diff options
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 | } |