mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
use Source for StructField
This commit is contained in:
parent
8b94b429e5
commit
178d8e96b5
5 changed files with 17 additions and 10 deletions
|
@ -102,8 +102,8 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn
|
|||
res.extend(hover_text(src.ast.doc_comment_text(), None));
|
||||
}
|
||||
Some(FieldAccess(it)) => {
|
||||
let it = it.source(db).1;
|
||||
if let hir::FieldSource::Named(it) = it {
|
||||
let src = it.source(db);
|
||||
if let hir::FieldSource::Named(it) = src.ast {
|
||||
res.extend(hover_text(it.doc_comment_text(), it.short_label()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue