diff options
author | Aleksey Kladov <[email protected]> | 2021-06-14 11:27:11 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-06-14 15:45:17 +0100 |
commit | a91071b57be6e64ad2fd277998ada0ae6206457b (patch) | |
tree | 7b9bdf5cba78b6b4fd87d197a851c3d764b45e01 /crates/ide_diagnostics | |
parent | 2e8dab631b4ab429eeade7f5302e8de9dcd0b398 (diff) |
internal: cut deps between assists and diagnostics
Diffstat (limited to 'crates/ide_diagnostics')
-rw-r--r-- | crates/ide_diagnostics/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ide_diagnostics/src/incorrect_case.rs | 3 | ||||
-rw-r--r-- | crates/ide_diagnostics/src/lib.rs | 5 | ||||
-rw-r--r-- | crates/ide_diagnostics/src/missing_fields.rs | 3 | ||||
-rw-r--r-- | crates/ide_diagnostics/src/missing_ok_or_some_in_tail_expr.rs | 3 | ||||
-rw-r--r-- | crates/ide_diagnostics/src/unresolved_module.rs | 3 |
6 files changed, 6 insertions, 12 deletions
diff --git a/crates/ide_diagnostics/Cargo.toml b/crates/ide_diagnostics/Cargo.toml index 738fca14e..fa2adf212 100644 --- a/crates/ide_diagnostics/Cargo.toml +++ b/crates/ide_diagnostics/Cargo.toml | |||
@@ -22,7 +22,6 @@ text_edit = { path = "../text_edit", version = "0.0.0" } | |||
22 | cfg = { path = "../cfg", version = "0.0.0" } | 22 | cfg = { path = "../cfg", version = "0.0.0" } |
23 | hir = { path = "../hir", version = "0.0.0" } | 23 | hir = { path = "../hir", version = "0.0.0" } |
24 | ide_db = { path = "../ide_db", version = "0.0.0" } | 24 | ide_db = { path = "../ide_db", version = "0.0.0" } |
25 | ide_assists = { path = "../ide_assists", version = "0.0.0" } | ||
26 | 25 | ||
27 | [dev-dependencies] | 26 | [dev-dependencies] |
28 | expect-test = "1.1" | 27 | expect-test = "1.1" |
diff --git a/crates/ide_diagnostics/src/incorrect_case.rs b/crates/ide_diagnostics/src/incorrect_case.rs index 04fc779ce..8e1a93aa7 100644 --- a/crates/ide_diagnostics/src/incorrect_case.rs +++ b/crates/ide_diagnostics/src/incorrect_case.rs | |||
@@ -1,6 +1,5 @@ | |||
1 | use hir::{db::AstDatabase, InFile}; | 1 | use hir::{db::AstDatabase, InFile}; |
2 | use ide_assists::Assist; | 2 | use ide_db::{assists::Assist, base_db::FilePosition}; |
3 | use ide_db::base_db::FilePosition; | ||
4 | use syntax::AstNode; | 3 | use syntax::AstNode; |
5 | 4 | ||
6 | use crate::{ | 5 | use crate::{ |
diff --git a/crates/ide_diagnostics/src/lib.rs b/crates/ide_diagnostics/src/lib.rs index 0d98307a2..2a16c73a8 100644 --- a/crates/ide_diagnostics/src/lib.rs +++ b/crates/ide_diagnostics/src/lib.rs | |||
@@ -28,6 +28,7 @@ mod field_shorthand; | |||
28 | 28 | ||
29 | use hir::{diagnostics::AnyDiagnostic, Semantics}; | 29 | use hir::{diagnostics::AnyDiagnostic, Semantics}; |
30 | use ide_db::{ | 30 | use ide_db::{ |
31 | assists::{Assist, AssistId, AssistKind, AssistResolveStrategy}, | ||
31 | base_db::{FileId, SourceDatabase}, | 32 | base_db::{FileId, SourceDatabase}, |
32 | label::Label, | 33 | label::Label, |
33 | source_change::SourceChange, | 34 | source_change::SourceChange, |
@@ -42,8 +43,6 @@ use syntax::{ | |||
42 | use text_edit::TextEdit; | 43 | use text_edit::TextEdit; |
43 | use unlinked_file::UnlinkedFile; | 44 | use unlinked_file::UnlinkedFile; |
44 | 45 | ||
45 | use ide_assists::{Assist, AssistId, AssistKind, AssistResolveStrategy}; | ||
46 | |||
47 | #[derive(Copy, Clone, Debug, PartialEq)] | 46 | #[derive(Copy, Clone, Debug, PartialEq)] |
48 | pub struct DiagnosticCode(pub &'static str); | 47 | pub struct DiagnosticCode(pub &'static str); |
49 | 48 | ||
@@ -265,8 +264,8 @@ fn unresolved_fix(id: &'static str, label: &str, target: TextRange) -> Assist { | |||
265 | #[cfg(test)] | 264 | #[cfg(test)] |
266 | mod tests { | 265 | mod tests { |
267 | use expect_test::Expect; | 266 | use expect_test::Expect; |
268 | use ide_assists::AssistResolveStrategy; | ||
269 | use ide_db::{ | 267 | use ide_db::{ |
268 | assists::AssistResolveStrategy, | ||
270 | base_db::{fixture::WithFixture, SourceDatabaseExt}, | 269 | base_db::{fixture::WithFixture, SourceDatabaseExt}, |
271 | RootDatabase, | 270 | RootDatabase, |
272 | }; | 271 | }; |
diff --git a/crates/ide_diagnostics/src/missing_fields.rs b/crates/ide_diagnostics/src/missing_fields.rs index f242ee481..5af67f461 100644 --- a/crates/ide_diagnostics/src/missing_fields.rs +++ b/crates/ide_diagnostics/src/missing_fields.rs | |||
@@ -1,7 +1,6 @@ | |||
1 | use either::Either; | 1 | use either::Either; |
2 | use hir::{db::AstDatabase, InFile}; | 2 | use hir::{db::AstDatabase, InFile}; |
3 | use ide_assists::Assist; | 3 | use ide_db::{assists::Assist, source_change::SourceChange}; |
4 | use ide_db::source_change::SourceChange; | ||
5 | use stdx::format_to; | 4 | use stdx::format_to; |
6 | use syntax::{algo, ast::make, AstNode, SyntaxNodePtr}; | 5 | use syntax::{algo, ast::make, AstNode, SyntaxNodePtr}; |
7 | use text_edit::TextEdit; | 6 | use text_edit::TextEdit; |
diff --git a/crates/ide_diagnostics/src/missing_ok_or_some_in_tail_expr.rs b/crates/ide_diagnostics/src/missing_ok_or_some_in_tail_expr.rs index 9e36ca296..01c79b6f5 100644 --- a/crates/ide_diagnostics/src/missing_ok_or_some_in_tail_expr.rs +++ b/crates/ide_diagnostics/src/missing_ok_or_some_in_tail_expr.rs | |||
@@ -1,6 +1,5 @@ | |||
1 | use hir::db::AstDatabase; | 1 | use hir::db::AstDatabase; |
2 | use ide_assists::Assist; | 2 | use ide_db::{assists::Assist, source_change::SourceChange}; |
3 | use ide_db::source_change::SourceChange; | ||
4 | use syntax::AstNode; | 3 | use syntax::AstNode; |
5 | use text_edit::TextEdit; | 4 | use text_edit::TextEdit; |
6 | 5 | ||
diff --git a/crates/ide_diagnostics/src/unresolved_module.rs b/crates/ide_diagnostics/src/unresolved_module.rs index b11e71b3e..5aa9dae17 100644 --- a/crates/ide_diagnostics/src/unresolved_module.rs +++ b/crates/ide_diagnostics/src/unresolved_module.rs | |||
@@ -1,6 +1,5 @@ | |||
1 | use hir::db::AstDatabase; | 1 | use hir::db::AstDatabase; |
2 | use ide_assists::Assist; | 2 | use ide_db::{assists::Assist, base_db::AnchoredPathBuf, source_change::FileSystemEdit}; |
3 | use ide_db::{base_db::AnchoredPathBuf, source_change::FileSystemEdit}; | ||
4 | use syntax::AstNode; | 3 | use syntax::AstNode; |
5 | 4 | ||
6 | use crate::{fix, Diagnostic, DiagnosticsContext}; | 5 | use crate::{fix, Diagnostic, DiagnosticsContext}; |