This commit is contained in:
Aleksey Kladov 2020-02-07 14:26:59 +01:00
parent f55be75a17
commit ae70d07237
6 changed files with 23 additions and 23 deletions

View file

@ -98,14 +98,14 @@ fn hover_text_from_name_kind(db: &RootDatabase, name_kind: NameKind) -> Option<S
let src = it.source(db);
hover_text(src.value.doc_comment_text(), Some(macro_label(&src.value)))
}
Field(it) => {
StructField(it) => {
let src = it.source(db);
match src.value {
hir::FieldSource::Named(it) => hover_text(it.doc_comment_text(), it.short_label()),
_ => None,
}
}
Def(it) => match it {
ModuleDef(it) => match it {
hir::ModuleDef::Module(it) => match it.definition_source(db).value {
hir::ModuleSource::Module(it) => {
hover_text(it.doc_comment_text(), it.short_label())