mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Remove node function in NavTarget
This commit is contained in:
parent
bb55111c20
commit
d46278d320
5 changed files with 94 additions and 88 deletions
|
@ -5,7 +5,6 @@ mod function_signature;
|
|||
mod navigation_target;
|
||||
mod structure;
|
||||
|
||||
use crate::db::RootDatabase;
|
||||
use ra_syntax::{ast::{self, AstNode, TypeParamsOwner}, SyntaxKind::{ATTR, COMMENT}};
|
||||
|
||||
pub use navigation_target::NavigationTarget;
|
||||
|
@ -73,8 +72,8 @@ where
|
|||
|
||||
// FIXME: this should not really use navigation target. Rather, approximately
|
||||
// resolved symbol should return a `DefId`.
|
||||
pub(crate) fn doc_text_for(db: &RootDatabase, nav: NavigationTarget) -> Option<String> {
|
||||
match (nav.description(db), nav.docs(db)) {
|
||||
pub(crate) fn doc_text_for(nav: NavigationTarget) -> Option<String> {
|
||||
match (nav.description, nav.docs) {
|
||||
(Some(desc), docs) => Some(rust_code_markup_with_doc(desc, docs)),
|
||||
(None, Some(docs)) => Some(docs),
|
||||
_ => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue