mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 09:48:10 +00:00
Merge #5749
5749: Rename ra_assists -> assists
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
00fb411f3e
57 changed files with 34 additions and 35 deletions
36
Cargo.lock
generated
36
Cargo.lock
generated
|
@ -46,6 +46,23 @@ version = "0.5.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
|
||||
|
||||
[[package]]
|
||||
name = "assists"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"base_db",
|
||||
"either",
|
||||
"hir",
|
||||
"ide_db",
|
||||
"itertools",
|
||||
"profile",
|
||||
"rustc-hash",
|
||||
"stdx",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
|
@ -1102,27 +1119,11 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_assists"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base_db",
|
||||
"either",
|
||||
"hir",
|
||||
"ide_db",
|
||||
"itertools",
|
||||
"profile",
|
||||
"rustc-hash",
|
||||
"stdx",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_ide"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"assists",
|
||||
"base_db",
|
||||
"cfg",
|
||||
"either",
|
||||
|
@ -1134,7 +1135,6 @@ dependencies = [
|
|||
"log",
|
||||
"oorandom",
|
||||
"profile",
|
||||
"ra_assists",
|
||||
"rustc-hash",
|
||||
"ssr",
|
||||
"stdx",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "ra_assists"
|
||||
version = "0.1.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
name = "assists"
|
||||
version = "0.0.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
@ -14,7 +14,6 @@ itertools = "0.9.0"
|
|||
either = "1.5.3"
|
||||
|
||||
stdx = { path = "../stdx" }
|
||||
|
||||
syntax = { path = "../syntax" }
|
||||
text_edit = { path = "../text_edit" }
|
||||
profile = { path = "../profile" }
|
|
@ -1,4 +1,4 @@
|
|||
//! `ra_assists` crate provides a bunch of code assists, also known as code
|
||||
//! `assists` crate provides a bunch of code assists, also known as code
|
||||
//! actions (in LSP) or intentions (in IntelliJ).
|
||||
//!
|
||||
//! An assist is a micro-refactoring, which is automatically activated in
|
|
@ -1,5 +1,5 @@
|
|||
//! This module contains an import search funcionality that is provided to the ra_assists module.
|
||||
//! Later, this should be moved away to a separate crate that is accessible from the ra_assists module.
|
||||
//! This module contains an import search funcionality that is provided to the assists module.
|
||||
//! Later, this should be moved away to a separate crate that is accessible from the assists module.
|
||||
|
||||
use hir::{Crate, MacroDef, ModuleDef, Semantics};
|
||||
use syntax::{ast, AstNode, SyntaxKind::NAME};
|
||||
|
|
|
@ -28,7 +28,7 @@ ide_db = { path = "../ide_db" }
|
|||
cfg = { path = "../cfg" }
|
||||
profile = { path = "../profile" }
|
||||
test_utils = { path = "../test_utils" }
|
||||
ra_assists = { path = "../ra_assists" }
|
||||
assists = { path = "../assists" }
|
||||
ssr = { path = "../ssr" }
|
||||
|
||||
# ra_ide should depend only on the top-level `hir` package. if you need
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//! FIXME: write short doc here
|
||||
use ra_assists::utils::TryEnum;
|
||||
use assists::utils::TryEnum;
|
||||
use syntax::{
|
||||
ast::{self, AstNode},
|
||||
TextRange, TextSize,
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
//! }
|
||||
//! ```
|
||||
|
||||
use assists::utils::get_missing_assoc_items;
|
||||
use hir::{self, Docs, HasSource};
|
||||
use ra_assists::utils::get_missing_assoc_items;
|
||||
use syntax::{
|
||||
ast::{self, edit, Impl},
|
||||
AstNode, SyntaxKind, SyntaxNode, TextRange, T,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use assists::utils::extract_trivial_expression;
|
||||
use itertools::Itertools;
|
||||
use ra_assists::utils::extract_trivial_expression;
|
||||
use syntax::{
|
||||
algo::{find_covering_element, non_trivia_sibling},
|
||||
ast::{self, AstNode, AstToken},
|
||||
|
|
|
@ -80,6 +80,7 @@ pub use crate::{
|
|||
},
|
||||
};
|
||||
|
||||
pub use assists::{Assist, AssistConfig, AssistId, AssistKind, ResolvedAssist};
|
||||
pub use base_db::{
|
||||
Canceled, CrateGraph, CrateId, Edition, FileId, FilePosition, FileRange, SourceRoot,
|
||||
SourceRootId,
|
||||
|
@ -93,7 +94,6 @@ pub use ide_db::{
|
|||
symbol_index::Query,
|
||||
RootDatabase,
|
||||
};
|
||||
pub use ra_assists::{Assist, AssistConfig, AssistId, AssistKind, ResolvedAssist};
|
||||
pub use ssr::SsrError;
|
||||
pub use text_edit::{Indel, TextEdit};
|
||||
|
||||
|
@ -478,7 +478,7 @@ impl Analysis {
|
|||
config: &AssistConfig,
|
||||
frange: FileRange,
|
||||
) -> Cancelable<Vec<ResolvedAssist>> {
|
||||
self.with_db(|db| ra_assists::Assist::resolved(db, config, frange))
|
||||
self.with_db(|db| assists::Assist::resolved(db, config, frange))
|
||||
}
|
||||
|
||||
/// Computes unresolved assists (aka code actions aka intentions) for the given
|
||||
|
|
|
@ -56,7 +56,7 @@ In particular, `cargo xtask codegen` generates:
|
|||
2. [`ast/generated`](https://github.com/rust-analyzer/rust-analyzer/blob/a0be39296d2925972cacd9fbf8b5fb258fad6947/crates/ra_syntax/src/ast/generated.rs)
|
||||
-- AST data structure.
|
||||
|
||||
3. [`doc_tests/generated`](https://github.com/rust-analyzer/rust-analyzer/blob/a0be39296d2925972cacd9fbf8b5fb258fad6947/crates/ra_assists/src/doc_tests/generated.rs),
|
||||
3. [`doc_tests/generated`](https://github.com/rust-analyzer/rust-analyzer/blob/a0be39296d2925972cacd9fbf8b5fb258fad6947/crates/assists/src/doc_tests/generated.rs),
|
||||
[`test_data/parser/inline`](https://github.com/rust-analyzer/rust-analyzer/tree/a0be39296d2925972cacd9fbf8b5fb258fad6947/crates/ra_syntax/test_data/parser/inline)
|
||||
-- tests for assists and the parser.
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ const SYNTAX_KINDS: &str = "crates/parser/src/syntax_kind/generated.rs";
|
|||
const AST_NODES: &str = "crates/syntax/src/ast/generated/nodes.rs";
|
||||
const AST_TOKENS: &str = "crates/syntax/src/ast/generated/tokens.rs";
|
||||
|
||||
const ASSISTS_DIR: &str = "crates/ra_assists/src/handlers";
|
||||
const ASSISTS_TESTS: &str = "crates/ra_assists/src/tests/generated.rs";
|
||||
const ASSISTS_DIR: &str = "crates/assists/src/handlers";
|
||||
const ASSISTS_TESTS: &str = "crates/assists/src/tests/generated.rs";
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub enum Mode {
|
||||
|
|
Loading…
Reference in a new issue