mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Simpliy hover on ast::name
This commit is contained in:
parent
34322ea9a3
commit
656a0fa9f9
2 changed files with 34 additions and 16 deletions
|
@ -73,13 +73,3 @@ where
|
|||
format!("```rust\n{}\n```", val.as_ref())
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: this should not really use navigation target. Rather, approximately
|
||||
// resolved symbol should return a `DefId`.
|
||||
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.to_string()),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue