aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/doc_links.rs5
-rw-r--r--crates/ide/src/hover.rs2
2 files changed, 3 insertions, 4 deletions
diff --git a/crates/ide/src/doc_links.rs b/crates/ide/src/doc_links.rs
index 730e0dd0a..f94adec9b 100644
--- a/crates/ide/src/doc_links.rs
+++ b/crates/ide/src/doc_links.rs
@@ -9,8 +9,7 @@ use url::Url;
9 9
10use hir::{ 10use hir::{
11 db::{DefDatabase, HirDatabase}, 11 db::{DefDatabase, HirDatabase},
12 Adt, AsAssocItem, AsName, AssocItem, AssocItemContainer, Crate, Field, HasAttrs, ItemInNs, 12 Adt, AsAssocItem, AssocItem, AssocItemContainer, Crate, Field, HasAttrs, ItemInNs, ModuleDef,
13 ModuleDef,
14}; 13};
15use ide_db::{ 14use ide_db::{
16 defs::{Definition, NameClass, NameRefClass}, 15 defs::{Definition, NameClass, NameRefClass},
@@ -429,7 +428,7 @@ fn get_symbol_filename(db: &dyn HirDatabase, definition: &ModuleDef) -> Option<S
429 ModuleDef::Module(_) => "index.html".to_string(), 428 ModuleDef::Module(_) => "index.html".to_string(),
430 ModuleDef::Trait(t) => format!("trait.{}.html", t.name(db)), 429 ModuleDef::Trait(t) => format!("trait.{}.html", t.name(db)),
431 ModuleDef::TypeAlias(t) => format!("type.{}.html", t.name(db)), 430 ModuleDef::TypeAlias(t) => format!("type.{}.html", t.name(db)),
432 ModuleDef::BuiltinType(t) => format!("primitive.{}.html", t.as_name()), 431 ModuleDef::BuiltinType(t) => format!("primitive.{}.html", t.name()),
433 ModuleDef::Function(f) => format!("fn.{}.html", f.name(db)), 432 ModuleDef::Function(f) => format!("fn.{}.html", f.name(db)),
434 ModuleDef::Variant(ev) => { 433 ModuleDef::Variant(ev) => {
435 format!("enum.{}.html#variant.{}", ev.parent_enum(db).name(db), ev.name(db)) 434 format!("enum.{}.html#variant.{}", ev.parent_enum(db).name(db), ev.name(db))
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 5d2d072b1..00745238a 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -334,7 +334,7 @@ fn hover_for_definition(db: &RootDatabase, def: Definition) -> Option<Markup> {
334 ModuleDef::Static(it) => from_def_source(db, it, mod_path), 334 ModuleDef::Static(it) => from_def_source(db, it, mod_path),
335 ModuleDef::Trait(it) => from_def_source(db, it, mod_path), 335 ModuleDef::Trait(it) => from_def_source(db, it, mod_path),
336 ModuleDef::TypeAlias(it) => from_def_source(db, it, mod_path), 336 ModuleDef::TypeAlias(it) => from_def_source(db, it, mod_path),
337 ModuleDef::BuiltinType(it) => Some(Markup::fenced_block(&it)), 337 ModuleDef::BuiltinType(it) => Some(Markup::fenced_block(&it.name())),
338 }, 338 },
339 Definition::Local(it) => Some(Markup::fenced_block(&it.ty(db).display(db))), 339 Definition::Local(it) => Some(Markup::fenced_block(&it.ty(db).display(db))),
340 Definition::SelfType(impl_def) => { 340 Definition::SelfType(impl_def) => {