mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Use classify_name_ref in hover
This commit is contained in:
parent
cbafae6fa8
commit
34322ea9a3
3 changed files with 130 additions and 13 deletions
|
@ -413,7 +413,7 @@ impl NavigationTarget {
|
|||
}
|
||||
}
|
||||
|
||||
fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> {
|
||||
pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> {
|
||||
let file = db.parse(symbol.file_id).tree;
|
||||
let node = symbol.ptr.to_node(file.syntax()).to_owned();
|
||||
|
||||
|
@ -439,7 +439,7 @@ fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> {
|
|||
/// Get a description of a symbol.
|
||||
///
|
||||
/// e.g. `struct Name`, `enum Name`, `fn Name`
|
||||
fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> {
|
||||
pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> {
|
||||
let file = db.parse(symbol.file_id).tree;
|
||||
let node = symbol.ptr.to_node(file.syntax()).to_owned();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue