From 958862093e83083b188427246323047a2c9e7bab Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 23 Nov 2019 14:43:38 +0300 Subject: Move docs to hir_def --- crates/ra_hir/src/db.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'crates/ra_hir/src/db.rs') diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index cae305f98..2dca0f637 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs @@ -5,7 +5,6 @@ use std::sync::Arc; use ra_db::salsa; use crate::{ - debug::HirDebugDatabase, ids, ty::{ method_resolution::CrateImplBlocks, @@ -18,23 +17,17 @@ use crate::{ pub use hir_def::db::{ BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQuery, CrateLangItemsQuery, - DefDatabase2, DefDatabase2Storage, EnumDataQuery, ExprScopesQuery, FunctionDataQuery, - GenericParamsQuery, ImplDataQuery, InternDatabase, InternDatabaseStorage, LangItemQuery, - ModuleLangItemsQuery, RawItemsQuery, RawItemsWithSourceMapQuery, StaticDataQuery, - StructDataQuery, TraitDataQuery, TypeAliasDataQuery, + DefDatabase2, DefDatabase2Storage, DocumentationQuery, EnumDataQuery, ExprScopesQuery, + FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase, InternDatabaseStorage, + LangItemQuery, ModuleLangItemsQuery, RawItemsQuery, RawItemsWithSourceMapQuery, + StaticDataQuery, StructDataQuery, TraitDataQuery, TypeAliasDataQuery, }; pub use hir_expand::db::{ AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery, ParseMacroQuery, }; -// This database uses `AstDatabase` internally, -#[salsa::query_group(DefDatabaseStorage)] -#[salsa::requires(AstDatabase)] -pub trait DefDatabase: HirDebugDatabase + DefDatabase2 { - #[salsa::invoke(crate::code_model::docs::documentation_query)] - fn documentation(&self, def: crate::DocDef) -> Option; -} +pub use DefDatabase2 as DefDatabase; #[salsa::query_group(HirDatabaseStorage)] #[salsa::requires(salsa::Database)] -- cgit v1.2.3 From fc1e543f7abb69b8cab308410fa0a127950ee1c5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 23 Nov 2019 14:44:43 +0300 Subject: Get rid of DefDatabase2 --- crates/ra_hir/src/db.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'crates/ra_hir/src/db.rs') diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 2dca0f637..399101b83 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs @@ -17,7 +17,7 @@ use crate::{ pub use hir_def::db::{ BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQuery, CrateLangItemsQuery, - DefDatabase2, DefDatabase2Storage, DocumentationQuery, EnumDataQuery, ExprScopesQuery, + DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, ExprScopesQuery, FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase, InternDatabaseStorage, LangItemQuery, ModuleLangItemsQuery, RawItemsQuery, RawItemsWithSourceMapQuery, StaticDataQuery, StructDataQuery, TraitDataQuery, TypeAliasDataQuery, @@ -27,8 +27,6 @@ pub use hir_expand::db::{ ParseMacroQuery, }; -pub use DefDatabase2 as DefDatabase; - #[salsa::query_group(HirDatabaseStorage)] #[salsa::requires(salsa::Database)] pub trait HirDatabase: DefDatabase + AstDatabase { -- cgit v1.2.3