mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
use Lazy, some fixes
This commit is contained in:
parent
19fbf2c16b
commit
88ff88d318
10 changed files with 51 additions and 43 deletions
|
@ -101,7 +101,7 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
|
|||
continue;
|
||||
}
|
||||
if let Some(name_ref) = node.as_node().cloned().and_then(ast::NameRef::cast) {
|
||||
let name_kind = classify_name_ref(db, file_id, &name_ref).map(|d| d.item);
|
||||
let name_kind = classify_name_ref(db, file_id, &name_ref).map(|d| d.kind);
|
||||
match name_kind {
|
||||
Some(Macro(_)) => "macro",
|
||||
Some(Field(_)) => "field",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue