mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +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
|
@ -297,6 +297,7 @@ pub struct FnSignature {
|
|||
/// True if the first param is `self`. This is relevant to decide whether this
|
||||
/// can be called as a method.
|
||||
pub(crate) has_self_param: bool,
|
||||
pub(crate) documentation: String,
|
||||
}
|
||||
|
||||
impl FnSignature {
|
||||
|
@ -317,6 +318,10 @@ impl FnSignature {
|
|||
pub fn has_self_param(&self) -> bool {
|
||||
self.has_self_param
|
||||
}
|
||||
|
||||
pub fn documentation(&self) -> &String {
|
||||
&self.documentation
|
||||
}
|
||||
}
|
||||
|
||||
impl Function {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue