diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-14 09:53:02 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-14 09:53:02 +0100 |
commit | 45ec95caf616e721ca9f876740e65b9591aa5faf (patch) | |
tree | 835504eec9ab011150d8c3ed618dcf62009dbed3 /crates/ra_hir_ty | |
parent | 612112a2c26ec61bf341f99e9e7753bb41873fc4 (diff) | |
parent | b2390f10fa55d983cd4439f1bfb07a3fa9a63e75 (diff) |
Merge #5359
5359: Cleanup visibility r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics.rs | 11 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/test_db.rs | 7 |
2 files changed, 11 insertions, 7 deletions
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 |
2 | pub mod expr; | 2 | mod expr; |
3 | mod match_check; | 3 | mod match_check; |
4 | pub mod unsafe_check; | 4 | mod unsafe_check; |
5 | 5 | ||
6 | use std::any::Any; | 6 | use std::any::Any; |
7 | 7 | ||
8 | use hir_def::DefWithBodyId; | ||
9 | use hir_expand::diagnostics::{AstDiagnostic, Diagnostic, DiagnosticSink}; | ||
8 | use hir_expand::{db::AstDatabase, name::Name, HirFileId, InFile}; | 10 | use hir_expand::{db::AstDatabase, name::Name, HirFileId, InFile}; |
9 | use ra_prof::profile; | 11 | use ra_prof::profile; |
10 | use ra_syntax::{ast, AstNode, AstPtr, SyntaxNodePtr}; | 12 | use ra_syntax::{ast, AstNode, AstPtr, SyntaxNodePtr}; |
11 | use stdx::format_to; | 13 | use stdx::format_to; |
12 | 14 | ||
13 | pub use hir_def::{diagnostics::UnresolvedModule, expr::MatchArm, path::Path, DefWithBodyId}; | ||
14 | pub use hir_expand::diagnostics::{AstDiagnostic, Diagnostic, DiagnosticSink}; | ||
15 | |||
16 | use crate::db::HirDatabase; | 15 | use crate::db::HirDatabase; |
17 | 16 | ||
17 | pub use crate::diagnostics::expr::{record_literal_missing_fields, record_pattern_missing_fields}; | ||
18 | |||
18 | pub fn validate_body(db: &dyn HirDatabase, owner: DefWithBodyId, sink: &mut DiagnosticSink<'_>) { | 19 | pub 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 | ||
8 | use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId, ModuleId}; | 8 | use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId, ModuleId}; |
9 | use hir_expand::{db::AstDatabase, diagnostics::DiagnosticSink}; | 9 | use hir_expand::{ |
10 | db::AstDatabase, | ||
11 | diagnostics::{Diagnostic, DiagnosticSink}, | ||
12 | }; | ||
10 | use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast}; | 13 | use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast}; |
11 | use ra_syntax::TextRange; | 14 | use ra_syntax::TextRange; |
12 | use rustc_hash::{FxHashMap, FxHashSet}; | 15 | use rustc_hash::{FxHashMap, FxHashSet}; |
13 | use stdx::format_to; | 16 | use stdx::format_to; |
14 | use test_utils::extract_annotations; | 17 | use test_utils::extract_annotations; |
15 | 18 | ||
16 | use crate::diagnostics::{validate_body, Diagnostic}; | 19 | use crate::diagnostics::validate_body; |
17 | 20 | ||
18 | #[salsa::database( | 21 | #[salsa::database( |
19 | ra_db::SourceDatabaseExtStorage, | 22 | ra_db::SourceDatabaseExtStorage, |