From 3f612d37c68a6e4c09e407b7cd2ad8a1d17ab4e6 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sat, 28 Nov 2020 16:30:39 +0200 Subject: Move the helpers into ide_db --- crates/completion/Cargo.toml | 1 - crates/completion/src/completions/record.rs | 4 ++-- crates/completion/src/completions/unqualified_path.rs | 2 +- crates/completion/src/config.rs | 2 +- crates/completion/src/item.rs | 2 +- crates/completion/src/render.rs | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) (limited to 'crates/completion') diff --git a/crates/completion/Cargo.toml b/crates/completion/Cargo.toml index 102de33f8..35e169a28 100644 --- a/crates/completion/Cargo.toml +++ b/crates/completion/Cargo.toml @@ -22,7 +22,6 @@ base_db = { path = "../base_db", version = "0.0.0" } ide_db = { path = "../ide_db", version = "0.0.0" } profile = { path = "../profile", version = "0.0.0" } test_utils = { path = "../test_utils", version = "0.0.0" } -ide_helpers = { path = "../ide_helpers", version = "0.0.0" } # completions crate should depend only on the top-level `hir` package. if you need # something from some `hir_xxx` subpackage, reexport the API via `hir`. diff --git a/crates/completion/src/completions/record.rs b/crates/completion/src/completions/record.rs index 218a1923c..eaa44c97d 100644 --- a/crates/completion/src/completions/record.rs +++ b/crates/completion/src/completions/record.rs @@ -1,5 +1,5 @@ //! Complete fields in record literals and patterns. -use ide_helpers::FamousDefs; +use ide_db::helpers::FamousDefs; use syntax::ast::Expr; use crate::{ @@ -46,7 +46,7 @@ pub(crate) fn complete_record(acc: &mut Completions, ctx: &CompletionContext) -> #[cfg(test)] mod tests { use expect_test::{expect, Expect}; - use ide_helpers::FamousDefs; + use ide_db::helpers::FamousDefs; use crate::{test_utils::completion_list, CompletionKind}; diff --git a/crates/completion/src/completions/unqualified_path.rs b/crates/completion/src/completions/unqualified_path.rs index db5dbb7dd..81691cd7f 100644 --- a/crates/completion/src/completions/unqualified_path.rs +++ b/crates/completion/src/completions/unqualified_path.rs @@ -2,8 +2,8 @@ use either::Either; use hir::{Adt, ModuleDef, ScopeDef, Type}; +use ide_db::helpers::insert_use::ImportScope; use ide_db::imports_locator; -use ide_helpers::insert_use::ImportScope; use syntax::AstNode; use test_utils::mark; diff --git a/crates/completion/src/config.rs b/crates/completion/src/config.rs index 1995b0754..654a76f7b 100644 --- a/crates/completion/src/config.rs +++ b/crates/completion/src/config.rs @@ -4,7 +4,7 @@ //! module, and we use to statically check that we only produce snippet //! completions if we are allowed to. -use ide_helpers::insert_use::MergeBehaviour; +use ide_db::helpers::insert_use::MergeBehaviour; #[derive(Clone, Debug, PartialEq, Eq)] pub struct CompletionConfig { diff --git a/crates/completion/src/item.rs b/crates/completion/src/item.rs index 3bfee1b3f..e85549fef 100644 --- a/crates/completion/src/item.rs +++ b/crates/completion/src/item.rs @@ -3,7 +3,7 @@ use std::fmt; use hir::{Documentation, ModPath, Mutability}; -use ide_helpers::{ +use ide_db::helpers::{ insert_use::{self, ImportScope, MergeBehaviour}, mod_path_to_ast, }; diff --git a/crates/completion/src/render.rs b/crates/completion/src/render.rs index e84aef0e4..504757a6a 100644 --- a/crates/completion/src/render.rs +++ b/crates/completion/src/render.rs @@ -10,8 +10,8 @@ pub(crate) mod type_alias; mod builder_ext; use hir::{Documentation, HasAttrs, HirDisplay, ModPath, Mutability, ScopeDef, Type}; +use ide_db::helpers::insert_use::{ImportScope, MergeBehaviour}; use ide_db::RootDatabase; -use ide_helpers::insert_use::{ImportScope, MergeBehaviour}; use syntax::TextRange; use test_utils::mark; -- cgit v1.2.3