mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Make doc comments optional
This commit is contained in:
parent
e9e0ea0398
commit
a892067951
4 changed files with 27 additions and 19 deletions
|
@ -100,12 +100,7 @@ impl NavigationTarget {
|
|||
fn docs(&self, db: &RootDatabase) -> Option<String> {
|
||||
let node = self.node(db)?;
|
||||
fn doc_comments<N: ast::DocCommentsOwner>(node: &N) -> Option<String> {
|
||||
let comments = node.doc_comment_text();
|
||||
if comments.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(comments)
|
||||
}
|
||||
node.doc_comment_text()
|
||||
}
|
||||
|
||||
visitor()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue