mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 05:38:46 +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"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
|
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]]
|
[[package]]
|
||||||
name = "atty"
|
name = "atty"
|
||||||
version = "0.2.14"
|
version = "0.2.14"
|
||||||
|
@ -602,11 +585,11 @@ dependencies = [
|
||||||
name = "ide"
|
name = "ide"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assists",
|
|
||||||
"cfg",
|
"cfg",
|
||||||
"either",
|
"either",
|
||||||
"expect-test",
|
"expect-test",
|
||||||
"hir",
|
"hir",
|
||||||
|
"ide_assists",
|
||||||
"ide_completion",
|
"ide_completion",
|
||||||
"ide_db",
|
"ide_db",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
|
@ -625,6 +608,23 @@ dependencies = [
|
||||||
"url",
|
"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]]
|
[[package]]
|
||||||
name = "ide_completion"
|
name = "ide_completion"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
|
|
@ -27,7 +27,7 @@ ide_db = { path = "../ide_db", version = "0.0.0" }
|
||||||
cfg = { path = "../cfg", version = "0.0.0" }
|
cfg = { path = "../cfg", version = "0.0.0" }
|
||||||
profile = { path = "../profile", version = "0.0.0" }
|
profile = { path = "../profile", version = "0.0.0" }
|
||||||
test_utils = { path = "../test_utils", 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" }
|
ssr = { path = "../ssr", version = "0.0.0" }
|
||||||
ide_completion = { path = "../ide_completion", 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.
|
//! This module implements a methods and free functions search in the specified file.
|
||||||
//! We have to skip tests, so cannot reuse file_structure module.
|
//! We have to skip tests, so cannot reuse file_structure module.
|
||||||
|
|
||||||
use assists::utils::test_related_attribute;
|
|
||||||
use hir::Semantics;
|
use hir::Semantics;
|
||||||
|
use ide_assists::utils::test_related_attribute;
|
||||||
use ide_db::RootDatabase;
|
use ide_db::RootDatabase;
|
||||||
use syntax::{ast, ast::NameOwner, AstNode, SyntaxNode};
|
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 itertools::Itertools;
|
||||||
use syntax::{
|
use syntax::{
|
||||||
algo::non_trivia_sibling,
|
algo::non_trivia_sibling,
|
||||||
|
|
|
@ -82,8 +82,8 @@ pub use crate::{
|
||||||
HlRange,
|
HlRange,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
pub use assists::{Assist, AssistConfig, AssistId, AssistKind};
|
|
||||||
pub use hir::{Documentation, Semantics};
|
pub use hir::{Documentation, Semantics};
|
||||||
|
pub use ide_assists::{Assist, AssistConfig, AssistId, AssistKind};
|
||||||
pub use ide_completion::{
|
pub use ide_completion::{
|
||||||
CompletionConfig, CompletionItem, CompletionItemKind, CompletionScore, ImportEdit,
|
CompletionConfig, CompletionItem, CompletionItemKind, CompletionScore, ImportEdit,
|
||||||
InsertTextFormat,
|
InsertTextFormat,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use assists::utils::test_related_attribute;
|
|
||||||
use cfg::CfgExpr;
|
use cfg::CfgExpr;
|
||||||
use hir::{AsAssocItem, HasAttrs, HasSource, Semantics};
|
use hir::{AsAssocItem, HasAttrs, HasSource, Semantics};
|
||||||
|
use ide_assists::utils::test_related_attribute;
|
||||||
use ide_db::{defs::Definition, RootDatabase, SymbolKind};
|
use ide_db::{defs::Definition, RootDatabase, SymbolKind};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use syntax::{
|
use syntax::{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "assists"
|
name = "ide_assists"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
description = "TBD"
|
description = "TBD"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
|
@ -32,7 +32,7 @@ struct Assist {
|
||||||
impl Assist {
|
impl Assist {
|
||||||
fn collect() -> Result<Vec<Assist>> {
|
fn collect() -> Result<Vec<Assist>> {
|
||||||
let mut res = Vec::new();
|
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())?;
|
collect_file(&mut res, path.as_path())?;
|
||||||
}
|
}
|
||||||
res.sort_by(|lhs, rhs| lhs.id.cmp(&rhs.id));
|
res.sort_by(|lhs, rhs| lhs.id.cmp(&rhs.id));
|
||||||
|
@ -135,7 +135,7 @@ r#####"
|
||||||
buf.push_str(&test)
|
buf.push_str(&test)
|
||||||
}
|
}
|
||||||
let buf = reformat(&buf)?;
|
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 {
|
fn hide_hash_comments(text: &str) -> String {
|
||||||
|
|
Loading…
Reference in a new issue