aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir/src/source_analyzer.rs2
-rw-r--r--crates/ra_hir_ty/src/diagnostics.rs11
-rw-r--r--crates/ra_hir_ty/src/test_db.rs7
3 files changed, 12 insertions, 8 deletions
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs
index bfa543e5b..d76345525 100644
--- a/crates/ra_hir/src/source_analyzer.rs
+++ b/crates/ra_hir/src/source_analyzer.rs
@@ -18,7 +18,7 @@ use hir_def::{
18}; 18};
19use hir_expand::{hygiene::Hygiene, name::AsName, HirFileId, InFile}; 19use hir_expand::{hygiene::Hygiene, name::AsName, HirFileId, InFile};
20use hir_ty::{ 20use hir_ty::{
21 diagnostics::expr::{record_literal_missing_fields, record_pattern_missing_fields}, 21 diagnostics::{record_literal_missing_fields, record_pattern_missing_fields},
22 InferenceResult, Substs, Ty, 22 InferenceResult, Substs, Ty,
23}; 23};
24use ra_syntax::{ 24use ra_syntax::{
diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs
index d9c2b1214..3623b8569 100644
--- a/crates/ra_hir_ty/src/diagnostics.rs
+++ b/crates/ra_hir_ty/src/diagnostics.rs
@@ -1,20 +1,21 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2pub mod expr; 2mod expr;
3mod match_check; 3mod match_check;
4pub mod unsafe_check; 4mod unsafe_check;
5 5
6use std::any::Any; 6use std::any::Any;
7 7
8use hir_def::DefWithBodyId;
9use hir_expand::diagnostics::{AstDiagnostic, Diagnostic, DiagnosticSink};
8use hir_expand::{db::AstDatabase, name::Name, HirFileId, InFile}; 10use hir_expand::{db::AstDatabase, name::Name, HirFileId, InFile};
9use ra_prof::profile; 11use ra_prof::profile;
10use ra_syntax::{ast, AstNode, AstPtr, SyntaxNodePtr}; 12use ra_syntax::{ast, AstNode, AstPtr, SyntaxNodePtr};
11use stdx::format_to; 13use stdx::format_to;
12 14
13pub use hir_def::{diagnostics::UnresolvedModule, expr::MatchArm, path::Path, DefWithBodyId};
14pub use hir_expand::diagnostics::{AstDiagnostic, Diagnostic, DiagnosticSink};
15
16use crate::db::HirDatabase; 15use crate::db::HirDatabase;
17 16
17pub use crate::diagnostics::expr::{record_literal_missing_fields, record_pattern_missing_fields};
18
18pub fn validate_body(db: &dyn HirDatabase, owner: DefWithBodyId, sink: &mut DiagnosticSink<'_>) { 19pub fn validate_body(db: &dyn HirDatabase, owner: DefWithBodyId, sink: &mut DiagnosticSink<'_>) {
19 let _p = profile("validate_body"); 20 let _p = profile("validate_body");
20 let infer = db.infer(owner); 21 let infer = db.infer(owner);
diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/ra_hir_ty/src/test_db.rs
index daf2b909e..ddafd0ea1 100644
--- a/crates/ra_hir_ty/src/test_db.rs
+++ b/crates/ra_hir_ty/src/test_db.rs
@@ -6,14 +6,17 @@ use std::{
6}; 6};
7 7
8use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId, ModuleId}; 8use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId, ModuleId};
9use hir_expand::{db::AstDatabase, diagnostics::DiagnosticSink}; 9use hir_expand::{
10 db::AstDatabase,
11 diagnostics::{Diagnostic, DiagnosticSink},
12};
10use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast}; 13use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast};
11use ra_syntax::TextRange; 14use ra_syntax::TextRange;
12use rustc_hash::{FxHashMap, FxHashSet}; 15use rustc_hash::{FxHashMap, FxHashSet};
13use stdx::format_to; 16use stdx::format_to;
14use test_utils::extract_annotations; 17use test_utils::extract_annotations;
15 18
16use crate::diagnostics::{validate_body, Diagnostic}; 19use crate::diagnostics::validate_body;
17 20
18#[salsa::database( 21#[salsa::database(
19 ra_db::SourceDatabaseExtStorage, 22 ra_db::SourceDatabaseExtStorage,