aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/hover.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs
index 244c65814..cc41390b2 100644
--- a/crates/ra_ide_api/src/hover.rs
+++ b/crates/ra_ide_api/src/hover.rs
@@ -1,6 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use hir::{Adt, BuiltinType, HasSource, HirDisplay}; 3use hir::{Adt, HasSource, HirDisplay};
4use ra_db::SourceDatabase; 4use ra_db::SourceDatabase;
5use ra_syntax::{ 5use ra_syntax::{
6 algo::{ancestors_at_offset, find_covering_element, find_node_at_offset}, 6 algo::{ancestors_at_offset, find_covering_element, find_node_at_offset},
@@ -132,11 +132,7 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn
132 hir::ModuleDef::Static(it) => res.extend(from_def_source(db, it)), 132 hir::ModuleDef::Static(it) => res.extend(from_def_source(db, it)),
133 hir::ModuleDef::Trait(it) => res.extend(from_def_source(db, it)), 133 hir::ModuleDef::Trait(it) => res.extend(from_def_source(db, it)),
134 hir::ModuleDef::TypeAlias(it) => res.extend(from_def_source(db, it)), 134 hir::ModuleDef::TypeAlias(it) => res.extend(from_def_source(db, it)),
135 hir::ModuleDef::BuiltinType(it) => { 135 hir::ModuleDef::BuiltinType(it) => res.extend(Some(it.to_string())),
136 if let Some(b) = BuiltinType::ALL.iter().find(|(_, ty)| *ty == it) {
137 res.extend(Some(b.0.to_string()))
138 }
139 }
140 }, 136 },
141 Some(SelfType(ty)) => { 137 Some(SelfType(ty)) => {
142 if let Some((adt_def, _)) = ty.as_adt() { 138 if let Some((adt_def, _)) = ty.as_adt() {