fix compilation

This commit is contained in:
Aleksey Kladov 2019-10-30 17:40:13 +03:00
parent e5300ad3ba
commit c1ed9ccc4e
7 changed files with 12 additions and 8 deletions

View File

@ -23,7 +23,10 @@ use crate::{
Struct, StructField, Trait, TypeAlias, Struct, StructField, Trait, TypeAlias,
}; };
pub use hir_def::db::{InternDatabase, InternDatabaseStorage}; pub use hir_def::db::{
DefDatabase2, DefDatabase2Storage, InternDatabase, InternDatabaseStorage, RawItemsQuery,
RawItemsWithSourceMapQuery,
};
pub use hir_expand::db::{ pub use hir_expand::db::{
AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery, AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery,
ParseMacroQuery, ParseMacroQuery,
@ -32,7 +35,7 @@ pub use hir_expand::db::{
// This database uses `AstDatabase` internally, // This database uses `AstDatabase` internally,
#[salsa::query_group(DefDatabaseStorage)] #[salsa::query_group(DefDatabaseStorage)]
#[salsa::requires(AstDatabase)] #[salsa::requires(AstDatabase)]
pub trait DefDatabase: HirDebugDatabase + hir_def::db::DefDatabase2 { pub trait DefDatabase: HirDebugDatabase + DefDatabase2 {
#[salsa::invoke(crate::adt::StructData::struct_data_query)] #[salsa::invoke(crate::adt::StructData::struct_data_query)]
fn struct_data(&self, s: Struct) -> Arc<StructData>; fn struct_data(&self, s: Struct) -> Arc<StructData>;

View File

@ -1 +0,0 @@
pub use hir_def::either::*;

View File

@ -26,7 +26,6 @@ macro_rules! impl_froms {
} }
} }
mod either;
pub mod debug; pub mod debug;
pub mod db; pub mod db;
@ -62,7 +61,6 @@ use crate::{ids::MacroFileKind, resolve::Resolver};
pub use crate::{ pub use crate::{
adt::VariantDef, adt::VariantDef,
either::Either,
expr::ExprScopes, expr::ExprScopes,
from_source::FromSource, from_source::FromSource,
generics::{GenericDef, GenericParam, GenericParams, HasGenericParams}, generics::{GenericDef, GenericParam, GenericParams, HasGenericParams},
@ -85,6 +83,7 @@ pub use self::code_model::{
}; };
pub use hir_def::{ pub use hir_def::{
either::Either,
name::Name, name::Name,
path::{Path, PathKind}, path::{Path, PathKind},
type_ref::Mutability, type_ref::Mutability,

View File

@ -17,12 +17,12 @@ use crate::{db, debug::HirDebugHelper, diagnostics::DiagnosticSink};
pub const WORKSPACE: SourceRootId = SourceRootId(0); pub const WORKSPACE: SourceRootId = SourceRootId(0);
#[salsa::database( #[salsa::database(
hir_def::db::DefDatabase2Storage,
ra_db::SourceDatabaseExtStorage, ra_db::SourceDatabaseExtStorage,
ra_db::SourceDatabaseStorage, ra_db::SourceDatabaseStorage,
db::InternDatabaseStorage, db::InternDatabaseStorage,
db::AstDatabaseStorage, db::AstDatabaseStorage,
db::DefDatabaseStorage, db::DefDatabaseStorage,
db::DefDatabase2Storage,
db::HirDatabaseStorage db::HirDatabaseStorage
)] )]
#[derive(Debug)] #[derive(Debug)]

View File

@ -1 +1,3 @@
//! FIXME: write short doc here
pub mod raw; pub mod raw;

View File

@ -8,7 +8,6 @@ use ra_syntax::{
ast::{self, AttrsOwner, NameOwner}, ast::{self, AttrsOwner, NameOwner},
AstNode, AstPtr, SourceFile, AstNode, AstPtr, SourceFile,
}; };
use test_utils::tested_by;
use crate::{ use crate::{
attr::Attr, attr::Attr,
@ -301,7 +300,8 @@ impl<DB: AstDatabase> RawItemsCollector<&DB> {
self.push_item(current_module, attrs, RawItemKind::Module(item)); self.push_item(current_module, attrs, RawItemKind::Module(item));
return; return;
} }
tested_by!(name_res_works_for_broken_modules); // FIXME: restore this mark once we complete hir splitting
// tested_by!(name_res_works_for_broken_modules);
} }
fn add_use_item(&mut self, current_module: Option<Module>, use_item: ast::UseItem) { fn add_use_item(&mut self, current_module: Option<Module>, use_item: ast::UseItem) {

View File

@ -23,6 +23,7 @@ use crate::{
hir::db::InternDatabaseStorage, hir::db::InternDatabaseStorage,
hir::db::AstDatabaseStorage, hir::db::AstDatabaseStorage,
hir::db::DefDatabaseStorage, hir::db::DefDatabaseStorage,
hir::db::DefDatabase2Storage,
hir::db::HirDatabaseStorage hir::db::HirDatabaseStorage
)] )]
#[derive(Debug)] #[derive(Debug)]