mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Thread documentation through FnSignature and CompletionItem
This commit is contained in:
parent
5d110c0ee2
commit
b77d780f0e
3 changed files with 15 additions and 1 deletions
|
@ -2,7 +2,7 @@ mod scope;
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use ra_syntax::{TreeArc, ast::{self, NameOwner}};
|
||||
use ra_syntax::{TreeArc, ast::{self, NameOwner, DocCommentsOwner}};
|
||||
|
||||
use crate::{
|
||||
DefId, HirDatabase, Name, AsName, Function, FnSignature, Module,
|
||||
|
@ -72,11 +72,15 @@ impl FnSignature {
|
|||
} else {
|
||||
TypeRef::unit()
|
||||
};
|
||||
|
||||
let comments = node.doc_comment_text();
|
||||
|
||||
let sig = FnSignature {
|
||||
name,
|
||||
params,
|
||||
ret_type,
|
||||
has_self_param,
|
||||
documentation: comments,
|
||||
};
|
||||
Arc::new(sig)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue