diff options
author | Kirill Bulatov <[email protected]> | 2020-11-28 14:30:39 +0000 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-11-28 14:30:39 +0000 |
commit | 3f612d37c68a6e4c09e407b7cd2ad8a1d17ab4e6 (patch) | |
tree | e51b5ce814d08c79bd667719992c8b7254e4eb68 /crates/assists/src/handlers | |
parent | 7b145bd99c855b2f4a15835a2298dde504b04d8f (diff) |
Move the helpers into ide_db
Diffstat (limited to 'crates/assists/src/handlers')
8 files changed, 11 insertions, 11 deletions
diff --git a/crates/assists/src/handlers/auto_import.rs b/crates/assists/src/handlers/auto_import.rs index 0b2d508d5..bd5bba646 100644 --- a/crates/assists/src/handlers/auto_import.rs +++ b/crates/assists/src/handlers/auto_import.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use ide_helpers::{ | 1 | use ide_db::helpers::{ |
2 | insert_use::{insert_use, ImportScope}, | 2 | insert_use::{insert_use, ImportScope}, |
3 | mod_path_to_ast, | 3 | mod_path_to_ast, |
4 | }; | 4 | }; |
diff --git a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs index fddd5354a..d85767b4e 100644 --- a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs +++ b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs | |||
@@ -2,11 +2,11 @@ use std::iter; | |||
2 | 2 | ||
3 | use either::Either; | 3 | use either::Either; |
4 | use hir::{AsName, EnumVariant, Module, ModuleDef, Name}; | 4 | use hir::{AsName, EnumVariant, Module, ModuleDef, Name}; |
5 | use ide_db::{defs::Definition, search::Reference, RootDatabase}; | 5 | use ide_db::helpers::{ |
6 | use ide_helpers::{ | ||
7 | insert_use::{insert_use, ImportScope}, | 6 | insert_use::{insert_use, ImportScope}, |
8 | mod_path_to_ast, | 7 | mod_path_to_ast, |
9 | }; | 8 | }; |
9 | use ide_db::{defs::Definition, search::Reference, RootDatabase}; | ||
10 | use rustc_hash::{FxHashMap, FxHashSet}; | 10 | use rustc_hash::{FxHashMap, FxHashSet}; |
11 | use syntax::{ | 11 | use syntax::{ |
12 | algo::{find_node_at_offset, SyntaxRewriter}, | 12 | algo::{find_node_at_offset, SyntaxRewriter}, |
@@ -237,7 +237,7 @@ fn update_reference( | |||
237 | 237 | ||
238 | #[cfg(test)] | 238 | #[cfg(test)] |
239 | mod tests { | 239 | mod tests { |
240 | use ide_helpers::FamousDefs; | 240 | use ide_db::helpers::FamousDefs; |
241 | 241 | ||
242 | use crate::tests::{check_assist, check_assist_not_applicable}; | 242 | use crate::tests::{check_assist, check_assist_not_applicable}; |
243 | 243 | ||
diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs index bd42e0f16..ef12ef0cf 100644 --- a/crates/assists/src/handlers/fill_match_arms.rs +++ b/crates/assists/src/handlers/fill_match_arms.rs | |||
@@ -1,8 +1,8 @@ | |||
1 | use std::iter; | 1 | use std::iter; |
2 | 2 | ||
3 | use hir::{Adt, HasSource, ModuleDef, Semantics}; | 3 | use hir::{Adt, HasSource, ModuleDef, Semantics}; |
4 | use ide_db::helpers::{mod_path_to_ast, FamousDefs}; | ||
4 | use ide_db::RootDatabase; | 5 | use ide_db::RootDatabase; |
5 | use ide_helpers::{mod_path_to_ast, FamousDefs}; | ||
6 | use itertools::Itertools; | 6 | use itertools::Itertools; |
7 | use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; | 7 | use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; |
8 | use test_utils::mark; | 8 | use test_utils::mark; |
@@ -213,7 +213,7 @@ fn build_pat(db: &RootDatabase, module: hir::Module, var: hir::EnumVariant) -> O | |||
213 | 213 | ||
214 | #[cfg(test)] | 214 | #[cfg(test)] |
215 | mod tests { | 215 | mod tests { |
216 | use ide_helpers::FamousDefs; | 216 | use ide_db::helpers::FamousDefs; |
217 | use test_utils::mark; | 217 | use test_utils::mark; |
218 | 218 | ||
219 | use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target}; | 219 | use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target}; |
diff --git a/crates/assists/src/handlers/generate_from_impl_for_enum.rs b/crates/assists/src/handlers/generate_from_impl_for_enum.rs index 01b14d94d..3c374e5d9 100644 --- a/crates/assists/src/handlers/generate_from_impl_for_enum.rs +++ b/crates/assists/src/handlers/generate_from_impl_for_enum.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | use ide_db::helpers::FamousDefs; | ||
1 | use ide_db::RootDatabase; | 2 | use ide_db::RootDatabase; |
2 | use ide_helpers::FamousDefs; | ||
3 | use syntax::ast::{self, AstNode, NameOwner}; | 3 | use syntax::ast::{self, AstNode, NameOwner}; |
4 | use test_utils::mark; | 4 | use test_utils::mark; |
5 | 5 | ||
diff --git a/crates/assists/src/handlers/merge_imports.rs b/crates/assists/src/handlers/merge_imports.rs index 8207f0e6e..b7e853994 100644 --- a/crates/assists/src/handlers/merge_imports.rs +++ b/crates/assists/src/handlers/merge_imports.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use ide_helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehaviour}; | 1 | use ide_db::helpers::insert_use::{try_merge_imports, try_merge_trees, MergeBehaviour}; |
2 | use syntax::{ | 2 | use syntax::{ |
3 | algo::{neighbor, SyntaxRewriter}, | 3 | algo::{neighbor, SyntaxRewriter}, |
4 | ast, AstNode, | 4 | ast, AstNode, |
diff --git a/crates/assists/src/handlers/qualify_path.rs b/crates/assists/src/handlers/qualify_path.rs index c0ee7ea0b..6f9810fe8 100644 --- a/crates/assists/src/handlers/qualify_path.rs +++ b/crates/assists/src/handlers/qualify_path.rs | |||
@@ -1,8 +1,8 @@ | |||
1 | use std::iter; | 1 | use std::iter; |
2 | 2 | ||
3 | use hir::AsName; | 3 | use hir::AsName; |
4 | use ide_db::helpers::mod_path_to_ast; | ||
4 | use ide_db::RootDatabase; | 5 | use ide_db::RootDatabase; |
5 | use ide_helpers::mod_path_to_ast; | ||
6 | use syntax::{ | 6 | use syntax::{ |
7 | ast, | 7 | ast, |
8 | ast::{make, ArgListOwner}, | 8 | ast::{make, ArgListOwner}, |
diff --git a/crates/assists/src/handlers/replace_derive_with_manual_impl.rs b/crates/assists/src/handlers/replace_derive_with_manual_impl.rs index fe262377c..4d6a1956b 100644 --- a/crates/assists/src/handlers/replace_derive_with_manual_impl.rs +++ b/crates/assists/src/handlers/replace_derive_with_manual_impl.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | use ide_db::helpers::mod_path_to_ast; | ||
1 | use ide_db::imports_locator; | 2 | use ide_db::imports_locator; |
2 | use ide_helpers::mod_path_to_ast; | ||
3 | use itertools::Itertools; | 3 | use itertools::Itertools; |
4 | use syntax::{ | 4 | use syntax::{ |
5 | ast::{self, make, AstNode}, | 5 | ast::{self, make, AstNode}, |
diff --git a/crates/assists/src/handlers/replace_qualified_name_with_use.rs b/crates/assists/src/handlers/replace_qualified_name_with_use.rs index 5e5c41a6f..8bdf9eea5 100644 --- a/crates/assists/src/handlers/replace_qualified_name_with_use.rs +++ b/crates/assists/src/handlers/replace_qualified_name_with_use.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use ide_helpers::insert_use::{insert_use, ImportScope}; | 1 | use ide_db::helpers::insert_use::{insert_use, ImportScope}; |
2 | use syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SyntaxNode}; | 2 | use syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SyntaxNode}; |
3 | use test_utils::mark; | 3 | use test_utils::mark; |
4 | 4 | ||