aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/code_model.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src/code_model.rs')
-rw-r--r--crates/hir/src/code_model.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs
index 59d8b3073..c2ee20dbb 100644
--- a/crates/hir/src/code_model.rs
+++ b/crates/hir/src/code_model.rs
@@ -17,9 +17,9 @@ use hir_def::{
17 resolver::{HasResolver, Resolver}, 17 resolver::{HasResolver, Resolver},
18 src::HasSource as _, 18 src::HasSource as _,
19 type_ref::{Mutability, TypeRef}, 19 type_ref::{Mutability, TypeRef},
20 AdtId, AssocContainerId, ConstId, DefWithBodyId, EnumId, FunctionId, GenericDefId, HasModule, 20 AdtId, AssocContainerId, AttrDefId, ConstId, DefWithBodyId, EnumId, FunctionId, GenericDefId,
21 ImplId, LocalEnumVariantId, LocalFieldId, LocalModuleId, Lookup, ModuleId, StaticId, StructId, 21 HasModule, ImplId, LocalEnumVariantId, LocalFieldId, LocalModuleId, Lookup, ModuleId, StaticId,
22 TraitId, TypeAliasId, TypeParamId, UnionId, 22 StructId, TraitId, TypeAliasId, TypeParamId, UnionId,
23}; 23};
24use hir_expand::{ 24use hir_expand::{
25 diagnostics::DiagnosticSink, 25 diagnostics::DiagnosticSink,
@@ -43,7 +43,7 @@ use tt::{Ident, Leaf, Literal, TokenTree};
43use crate::{ 43use crate::{
44 db::{DefDatabase, HirDatabase}, 44 db::{DefDatabase, HirDatabase},
45 has_source::HasSource, 45 has_source::HasSource,
46 AttrDef, HirDisplay, InFile, Name, 46 HirDisplay, InFile, Name,
47}; 47};
48 48
49/// hir::Crate describes a single crate. It's the main interface with which 49/// hir::Crate describes a single crate. It's the main interface with which
@@ -126,7 +126,7 @@ impl Crate {
126 /// Try to get the root URL of the documentation of a crate. 126 /// Try to get the root URL of the documentation of a crate.
127 pub fn get_html_root_url(self: &Crate, db: &dyn HirDatabase) -> Option<String> { 127 pub fn get_html_root_url(self: &Crate, db: &dyn HirDatabase) -> Option<String> {
128 // Look for #![doc(html_root_url = "...")] 128 // Look for #![doc(html_root_url = "...")]
129 let attrs = db.attrs(AttrDef::from(self.root_module(db)).into()); 129 let attrs = db.attrs(AttrDefId::ModuleId(self.root_module(db).into()));
130 let doc_attr_q = attrs.by_key("doc"); 130 let doc_attr_q = attrs.by_key("doc");
131 131
132 if !doc_attr_q.exists() { 132 if !doc_attr_q.exists() {