From b3652ef2886e01f772559aa90df4c45e7c7fb1fd Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 7 Dec 2020 18:06:46 +0100 Subject: Remove documentation query --- crates/hir/src/attrs.rs | 2 +- crates/hir/src/db.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/hir/src') diff --git a/crates/hir/src/attrs.rs b/crates/hir/src/attrs.rs index c3e820d89..fb2631b3e 100644 --- a/crates/hir/src/attrs.rs +++ b/crates/hir/src/attrs.rs @@ -38,7 +38,7 @@ macro_rules! impl_has_attrs { } fn docs(self, db: &dyn HirDatabase) -> Option { let def = AttrDefId::$def_id(self.into()); - db.documentation(def) + db.attrs(def).docs() } fn resolve_doc_path(self, db: &dyn HirDatabase, link: &str, ns: Option) -> Option { let def = AttrDefId::$def_id(self.into()); diff --git a/crates/hir/src/db.rs b/crates/hir/src/db.rs index 8c767b249..8d949b264 100644 --- a/crates/hir/src/db.rs +++ b/crates/hir/src/db.rs @@ -2,12 +2,12 @@ pub use hir_def::db::{ AttrsQuery, BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQueryQuery, - CrateLangItemsQuery, DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, - ExprScopesQuery, FunctionDataQuery, GenericParamsQuery, ImplDataQuery, ImportMapQuery, - InternConstQuery, InternDatabase, InternDatabaseStorage, InternEnumQuery, InternFunctionQuery, - InternImplQuery, InternStaticQuery, InternStructQuery, InternTraitQuery, InternTypeAliasQuery, - InternUnionQuery, ItemTreeQuery, LangItemQuery, ModuleLangItemsQuery, StaticDataQuery, - StructDataQuery, TraitDataQuery, TypeAliasDataQuery, UnionDataQuery, + CrateLangItemsQuery, DefDatabase, DefDatabaseStorage, EnumDataQuery, ExprScopesQuery, + FunctionDataQuery, GenericParamsQuery, ImplDataQuery, ImportMapQuery, InternConstQuery, + InternDatabase, InternDatabaseStorage, InternEnumQuery, InternFunctionQuery, InternImplQuery, + InternStaticQuery, InternStructQuery, InternTraitQuery, InternTypeAliasQuery, InternUnionQuery, + ItemTreeQuery, LangItemQuery, ModuleLangItemsQuery, StaticDataQuery, StructDataQuery, + TraitDataQuery, TypeAliasDataQuery, UnionDataQuery, }; pub use hir_expand::db::{ AstDatabase, AstDatabaseStorage, AstIdMapQuery, InternEagerExpansionQuery, InternMacroQuery, -- cgit v1.2.3 From 1caaa201fa55caaedaa124d23934c178bdf15b18 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 7 Dec 2020 18:49:03 +0100 Subject: Remove hir_def/docs.rs module --- crates/hir/src/attrs.rs | 5 ++++- crates/hir/src/lib.rs | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'crates/hir/src') diff --git a/crates/hir/src/attrs.rs b/crates/hir/src/attrs.rs index fb2631b3e..1f2ee2580 100644 --- a/crates/hir/src/attrs.rs +++ b/crates/hir/src/attrs.rs @@ -1,6 +1,9 @@ //! Attributes & documentation for hir types. use hir_def::{ - attr::Attrs, docs::Documentation, path::ModPath, resolver::HasResolver, AttrDefId, ModuleDefId, + attr::{Attrs, Documentation}, + path::ModPath, + resolver::HasResolver, + AttrDefId, ModuleDefId, }; use hir_expand::hygiene::Hygiene; use hir_ty::db::HirDatabase; diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 93bdb4472..c7c7377d7 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -44,10 +44,9 @@ pub use crate::{ pub use hir_def::{ adt::StructKind, - attr::Attrs, + attr::{Attrs, Documentation}, body::scope::ExprScopes, builtin_type::BuiltinType, - docs::Documentation, find_path::PrefixKind, import_map, item_scope::ItemInNs, -- cgit v1.2.3