mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
return Declaration from classify_name
This commit is contained in:
parent
0b5d0a41fd
commit
83f780eabf
2 changed files with 59 additions and 36 deletions
|
@ -92,7 +92,7 @@ pub(crate) fn find_all_refs(
|
|||
) -> Option<RangeInfo<(hir::SourceAnalyzer, NameKind)>> {
|
||||
if let Some(name) = find_node_at_offset::<ast::Name>(&syntax, position.offset) {
|
||||
let analyzer = hir::SourceAnalyzer::new(db, position.file_id, name.syntax(), None);
|
||||
let name_kind = classify_name(db, position.file_id, &name)?;
|
||||
let name_kind = classify_name(db, position.file_id, &name)?.item;
|
||||
let range = name.syntax().text_range();
|
||||
return Some(RangeInfo::new(range, (analyzer, name_kind)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue