mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 04:23:25 +00:00
7526: Rename crate assists to ide_assists.
This commit is contained in:
parent
8687053b11
commit
e4756cb4f6
73 changed files with 26 additions and 26 deletions
36
Cargo.lock
generated
36
Cargo.lock
generated
|
@ -53,23 +53,6 @@ version = "0.5.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
|
||||
|
||||
[[package]]
|
||||
name = "assists"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"either",
|
||||
"expect-test",
|
||||
"hir",
|
||||
"ide_db",
|
||||
"itertools 0.10.0",
|
||||
"profile",
|
||||
"rustc-hash",
|
||||
"stdx",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
|
@ -602,11 +585,11 @@ dependencies = [
|
|||
name = "ide"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"assists",
|
||||
"cfg",
|
||||
"either",
|
||||
"expect-test",
|
||||
"hir",
|
||||
"ide_assists",
|
||||
"ide_completion",
|
||||
"ide_db",
|
||||
"indexmap",
|
||||
|
@ -625,6 +608,23 @@ dependencies = [
|
|||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ide_assists"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"either",
|
||||
"expect-test",
|
||||
"hir",
|
||||
"ide_db",
|
||||
"itertools 0.10.0",
|
||||
"profile",
|
||||
"rustc-hash",
|
||||
"stdx",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ide_completion"
|
||||
version = "0.0.0"
|
||||
|
|
|
@ -27,7 +27,7 @@ ide_db = { path = "../ide_db", version = "0.0.0" }
|
|||
cfg = { path = "../cfg", version = "0.0.0" }
|
||||
profile = { path = "../profile", version = "0.0.0" }
|
||||
test_utils = { path = "../test_utils", version = "0.0.0" }
|
||||
assists = { path = "../assists", version = "0.0.0" }
|
||||
ide_assists = { path = "../ide_assists", version = "0.0.0" }
|
||||
ssr = { path = "../ssr", version = "0.0.0" }
|
||||
ide_completion = { path = "../ide_completion", version = "0.0.0" }
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//! This module implements a methods and free functions search in the specified file.
|
||||
//! We have to skip tests, so cannot reuse file_structure module.
|
||||
|
||||
use assists::utils::test_related_attribute;
|
||||
use hir::Semantics;
|
||||
use ide_assists::utils::test_related_attribute;
|
||||
use ide_db::RootDatabase;
|
||||
use syntax::{ast, ast::NameOwner, AstNode, SyntaxNode};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use assists::utils::extract_trivial_expression;
|
||||
use ide_assists::utils::extract_trivial_expression;
|
||||
use itertools::Itertools;
|
||||
use syntax::{
|
||||
algo::non_trivia_sibling,
|
||||
|
|
|
@ -82,8 +82,8 @@ pub use crate::{
|
|||
HlRange,
|
||||
},
|
||||
};
|
||||
pub use assists::{Assist, AssistConfig, AssistId, AssistKind};
|
||||
pub use hir::{Documentation, Semantics};
|
||||
pub use ide_assists::{Assist, AssistConfig, AssistId, AssistKind};
|
||||
pub use ide_completion::{
|
||||
CompletionConfig, CompletionItem, CompletionItemKind, CompletionScore, ImportEdit,
|
||||
InsertTextFormat,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::fmt;
|
||||
|
||||
use assists::utils::test_related_attribute;
|
||||
use cfg::CfgExpr;
|
||||
use hir::{AsAssocItem, HasAttrs, HasSource, Semantics};
|
||||
use ide_assists::utils::test_related_attribute;
|
||||
use ide_db::{defs::Definition, RootDatabase, SymbolKind};
|
||||
use itertools::Itertools;
|
||||
use syntax::{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "assists"
|
||||
name = "ide_assists"
|
||||
version = "0.0.0"
|
||||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
|
@ -32,7 +32,7 @@ struct Assist {
|
|||
impl Assist {
|
||||
fn collect() -> Result<Vec<Assist>> {
|
||||
let mut res = Vec::new();
|
||||
for path in rust_files_in(&project_root().join("crates/assists/src/handlers")) {
|
||||
for path in rust_files_in(&project_root().join("crates/ide_assists/src/handlers")) {
|
||||
collect_file(&mut res, path.as_path())?;
|
||||
}
|
||||
res.sort_by(|lhs, rhs| lhs.id.cmp(&rhs.id));
|
||||
|
@ -135,7 +135,7 @@ r#####"
|
|||
buf.push_str(&test)
|
||||
}
|
||||
let buf = reformat(&buf)?;
|
||||
codegen::update(&project_root().join("crates/assists/src/tests/generated.rs"), &buf, mode)
|
||||
codegen::update(&project_root().join("crates/ide_assists/src/tests/generated.rs"), &buf, mode)
|
||||
}
|
||||
|
||||
fn hide_hash_comments(text: &str) -> String {
|
||||
|
|
Loading…
Reference in a new issue