mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Use Source<&ast::Name> in classify_name
This commit is contained in:
parent
9cc4d058d2
commit
a22cb1daa7
4 changed files with 22 additions and 25 deletions
|
@ -193,7 +193,9 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn
|
|||
None
|
||||
}
|
||||
} else if let Some(name) = find_node_at_offset::<ast::Name>(file.syntax(), position.offset) {
|
||||
if let Some(name_kind) = classify_name(db, position.file_id, &name).map(|d| d.kind) {
|
||||
if let Some(name_kind) =
|
||||
classify_name(db, Source::new(position.file_id.into(), &name)).map(|d| d.kind)
|
||||
{
|
||||
let mut _b: bool = true;
|
||||
res.extend(hover_text_from_name_kind(db, name_kind, &mut _b));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue