diff options
Diffstat (limited to 'crates/ra_ide_api/src/hover.rs')
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index 4b7847de8..28a6bef12 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use hir::{HasSource, HirDisplay}; | 1 | use hir::{Adt, HasSource, HirDisplay}; |
2 | use ra_db::SourceDatabase; | 2 | use ra_db::SourceDatabase; |
3 | use ra_syntax::{ | 3 | use ra_syntax::{ |
4 | algo::{ | 4 | algo::{ |
@@ -129,9 +129,9 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn | |||
129 | } | 129 | } |
130 | } | 130 | } |
131 | hir::ModuleDef::Function(it) => res.extend(from_def_source(db, it)), | 131 | hir::ModuleDef::Function(it) => res.extend(from_def_source(db, it)), |
132 | hir::ModuleDef::Struct(it) => res.extend(from_def_source(db, it)), | 132 | hir::ModuleDef::Adt(Adt::Struct(it)) => res.extend(from_def_source(db, it)), |
133 | hir::ModuleDef::Union(it) => res.extend(from_def_source(db, it)), | 133 | hir::ModuleDef::Adt(Adt::Union(it)) => res.extend(from_def_source(db, it)), |
134 | hir::ModuleDef::Enum(it) => res.extend(from_def_source(db, it)), | 134 | hir::ModuleDef::Adt(Adt::Enum(it)) => res.extend(from_def_source(db, it)), |
135 | hir::ModuleDef::EnumVariant(it) => res.extend(from_def_source(db, it)), | 135 | hir::ModuleDef::EnumVariant(it) => res.extend(from_def_source(db, it)), |
136 | hir::ModuleDef::Const(it) => res.extend(from_def_source(db, it)), | 136 | hir::ModuleDef::Const(it) => res.extend(from_def_source(db, it)), |
137 | hir::ModuleDef::Static(it) => res.extend(from_def_source(db, it)), | 137 | hir::ModuleDef::Static(it) => res.extend(from_def_source(db, it)), |
@@ -145,9 +145,9 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn | |||
145 | Some(SelfType(ty)) => { | 145 | Some(SelfType(ty)) => { |
146 | if let Some((adt_def, _)) = ty.as_adt() { | 146 | if let Some((adt_def, _)) = ty.as_adt() { |
147 | res.extend(match adt_def { | 147 | res.extend(match adt_def { |
148 | hir::AdtDef::Struct(it) => from_def_source(db, it), | 148 | hir::Adt::Struct(it) => from_def_source(db, it), |
149 | hir::AdtDef::Union(it) => from_def_source(db, it), | 149 | hir::Adt::Union(it) => from_def_source(db, it), |
150 | hir::AdtDef::Enum(it) => from_def_source(db, it), | 150 | hir::Adt::Enum(it) => from_def_source(db, it), |
151 | }) | 151 | }) |
152 | } | 152 | } |
153 | } | 153 | } |