diff options
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/attrs.rs | 7 | ||||
-rw-r--r-- | crates/hir/src/db.rs | 12 | ||||
-rw-r--r-- | crates/hir/src/lib.rs | 3 |
3 files changed, 12 insertions, 10 deletions
diff --git a/crates/hir/src/attrs.rs b/crates/hir/src/attrs.rs index c3e820d89..1f2ee2580 100644 --- a/crates/hir/src/attrs.rs +++ b/crates/hir/src/attrs.rs | |||
@@ -1,6 +1,9 @@ | |||
1 | //! Attributes & documentation for hir types. | 1 | //! Attributes & documentation for hir types. |
2 | use hir_def::{ | 2 | use hir_def::{ |
3 | attr::Attrs, docs::Documentation, path::ModPath, resolver::HasResolver, AttrDefId, ModuleDefId, | 3 | attr::{Attrs, Documentation}, |
4 | path::ModPath, | ||
5 | resolver::HasResolver, | ||
6 | AttrDefId, ModuleDefId, | ||
4 | }; | 7 | }; |
5 | use hir_expand::hygiene::Hygiene; | 8 | use hir_expand::hygiene::Hygiene; |
6 | use hir_ty::db::HirDatabase; | 9 | use hir_ty::db::HirDatabase; |
@@ -38,7 +41,7 @@ macro_rules! impl_has_attrs { | |||
38 | } | 41 | } |
39 | fn docs(self, db: &dyn HirDatabase) -> Option<Documentation> { | 42 | fn docs(self, db: &dyn HirDatabase) -> Option<Documentation> { |
40 | let def = AttrDefId::$def_id(self.into()); | 43 | let def = AttrDefId::$def_id(self.into()); |
41 | db.documentation(def) | 44 | db.attrs(def).docs() |
42 | } | 45 | } |
43 | fn resolve_doc_path(self, db: &dyn HirDatabase, link: &str, ns: Option<Namespace>) -> Option<ModuleDef> { | 46 | fn resolve_doc_path(self, db: &dyn HirDatabase, link: &str, ns: Option<Namespace>) -> Option<ModuleDef> { |
44 | let def = AttrDefId::$def_id(self.into()); | 47 | 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 @@ | |||
2 | 2 | ||
3 | pub use hir_def::db::{ | 3 | pub use hir_def::db::{ |
4 | AttrsQuery, BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQueryQuery, | 4 | AttrsQuery, BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQueryQuery, |
5 | CrateLangItemsQuery, DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, | 5 | CrateLangItemsQuery, DefDatabase, DefDatabaseStorage, EnumDataQuery, ExprScopesQuery, |
6 | ExprScopesQuery, FunctionDataQuery, GenericParamsQuery, ImplDataQuery, ImportMapQuery, | 6 | FunctionDataQuery, GenericParamsQuery, ImplDataQuery, ImportMapQuery, InternConstQuery, |
7 | InternConstQuery, InternDatabase, InternDatabaseStorage, InternEnumQuery, InternFunctionQuery, | 7 | InternDatabase, InternDatabaseStorage, InternEnumQuery, InternFunctionQuery, InternImplQuery, |
8 | InternImplQuery, InternStaticQuery, InternStructQuery, InternTraitQuery, InternTypeAliasQuery, | 8 | InternStaticQuery, InternStructQuery, InternTraitQuery, InternTypeAliasQuery, InternUnionQuery, |
9 | InternUnionQuery, ItemTreeQuery, LangItemQuery, ModuleLangItemsQuery, StaticDataQuery, | 9 | ItemTreeQuery, LangItemQuery, ModuleLangItemsQuery, StaticDataQuery, StructDataQuery, |
10 | StructDataQuery, TraitDataQuery, TypeAliasDataQuery, UnionDataQuery, | 10 | TraitDataQuery, TypeAliasDataQuery, UnionDataQuery, |
11 | }; | 11 | }; |
12 | pub use hir_expand::db::{ | 12 | pub use hir_expand::db::{ |
13 | AstDatabase, AstDatabaseStorage, AstIdMapQuery, InternEagerExpansionQuery, InternMacroQuery, | 13 | AstDatabase, AstDatabaseStorage, AstIdMapQuery, InternEagerExpansionQuery, InternMacroQuery, |
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::{ | |||
44 | 44 | ||
45 | pub use hir_def::{ | 45 | pub use hir_def::{ |
46 | adt::StructKind, | 46 | adt::StructKind, |
47 | attr::Attrs, | 47 | attr::{Attrs, Documentation}, |
48 | body::scope::ExprScopes, | 48 | body::scope::ExprScopes, |
49 | builtin_type::BuiltinType, | 49 | builtin_type::BuiltinType, |
50 | docs::Documentation, | ||
51 | find_path::PrefixKind, | 50 | find_path::PrefixKind, |
52 | import_map, | 51 | import_map, |
53 | item_scope::ItemInNs, | 52 | item_scope::ItemInNs, |