Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8e97f40

Browse files
authored
Merge pull request rust-lang#18421 from Veykril/push-uxxwvwnqvomr
Move text-edit into ide-db
2 parents b12859a + 86ae80c commit 8e97f40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+684
-707
lines changed

src/tools/rust-analyzer/Cargo.lock

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,6 @@ dependencies = [
671671
"syntax",
672672
"test-fixture",
673673
"test-utils",
674-
"text-edit",
675674
"toolchain",
676675
"tracing",
677676
"triomphe",
@@ -693,7 +692,6 @@ dependencies = [
693692
"syntax",
694693
"test-fixture",
695694
"test-utils",
696-
"text-edit",
697695
"tracing",
698696
]
699697

@@ -712,7 +710,6 @@ dependencies = [
712710
"syntax",
713711
"test-fixture",
714712
"test-utils",
715-
"text-edit",
716713
"tracing",
717714
]
718715

@@ -744,7 +741,6 @@ dependencies = [
744741
"syntax",
745742
"test-fixture",
746743
"test-utils",
747-
"text-edit",
748744
"tracing",
749745
"triomphe",
750746
]
@@ -766,7 +762,6 @@ dependencies = [
766762
"syntax",
767763
"test-fixture",
768764
"test-utils",
769-
"text-edit",
770765
"tracing",
771766
]
772767

@@ -785,7 +780,6 @@ dependencies = [
785780
"syntax",
786781
"test-fixture",
787782
"test-utils",
788-
"text-edit",
789783
"triomphe",
790784
]
791785

@@ -1979,7 +1973,6 @@ dependencies = [
19791973
"smol_str",
19801974
"stdx",
19811975
"test-utils",
1982-
"text-edit",
19831976
"tracing",
19841977
"triomphe",
19851978
]
@@ -2027,14 +2020,6 @@ dependencies = [
20272020
"tracing",
20282021
]
20292022

2030-
[[package]]
2031-
name = "text-edit"
2032-
version = "0.0.0"
2033-
dependencies = [
2034-
"itertools",
2035-
"text-size",
2036-
]
2037-
20382023
[[package]]
20392024
name = "text-size"
20402025
version = "1.1.1"

src/tools/rust-analyzer/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ span = { path = "./crates/span", version = "0.0.0" }
7979
stdx = { path = "./crates/stdx", version = "0.0.0" }
8080
syntax = { path = "./crates/syntax", version = "0.0.0" }
8181
syntax-bridge = { path = "./crates/syntax-bridge", version = "0.0.0" }
82-
text-edit = { path = "./crates/text-edit", version = "0.0.0" }
8382
toolchain = { path = "./crates/toolchain", version = "0.0.0" }
8483
tt = { path = "./crates/tt", version = "0.0.0" }
8584
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }

src/tools/rust-analyzer/crates/ide-assists/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ tracing.workspace = true
2323
# local deps
2424
stdx.workspace = true
2525
syntax.workspace = true
26-
text-edit.workspace = true
2726
ide-db.workspace = true
2827
hir.workspace = true
2928

src/tools/rust-analyzer/crates/ide-assists/src/handlers/bool_to_enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use either::Either;
22
use hir::ModuleDef;
3+
use ide_db::text_edit::TextRange;
34
use ide_db::{
45
assists::{AssistId, AssistKind},
56
defs::Definition,
@@ -19,7 +20,6 @@ use syntax::{
1920
},
2021
AstNode, NodeOrToken, SyntaxKind, SyntaxNode, T,
2122
};
22-
use text_edit::TextRange;
2323

2424
use crate::{
2525
assist_context::{AssistContext, Assists},

src/tools/rust-analyzer/crates/ide-assists/src/handlers/destructure_struct_binding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use hir::{sym, HasVisibility};
2+
use ide_db::text_edit::TextRange;
23
use ide_db::{
34
assists::{AssistId, AssistKind},
45
defs::Definition,
@@ -8,7 +9,6 @@ use ide_db::{
89
};
910
use itertools::Itertools;
1011
use syntax::{ast, ted, AstNode, Edition, SmolStr, SyntaxNode, ToSmolStr};
11-
use text_edit::TextRange;
1212

1313
use crate::{
1414
assist_context::{AssistContext, Assists, SourceChangeBuilder},

src/tools/rust-analyzer/crates/ide-assists/src/handlers/destructure_tuple_binding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use ide_db::text_edit::TextRange;
12
use ide_db::{
23
assists::{AssistId, AssistKind},
34
defs::Definition,
@@ -8,7 +9,6 @@ use syntax::{
89
ast::{self, make, AstNode, FieldExpr, HasName, IdentPat},
910
ted,
1011
};
11-
use text_edit::TextRange;
1212

1313
use crate::{
1414
assist_context::{AssistContext, Assists, SourceChangeBuilder},

src/tools/rust-analyzer/crates/ide-assists/src/handlers/remove_unused_imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::collections::hash_map::Entry;
22

33
use hir::{FileRange, HirFileIdExt, InFile, InRealFile, Module, ModuleSource};
4+
use ide_db::text_edit::TextRange;
45
use ide_db::{
56
defs::Definition,
67
search::{FileReference, ReferenceCategory, SearchScope},
@@ -10,7 +11,6 @@ use syntax::{
1011
ast::{self, Rename},
1112
AstNode,
1213
};
13-
use text_edit::TextRange;
1414

1515
use crate::{AssistContext, AssistId, AssistKind, Assists};
1616

src/tools/rust-analyzer/crates/ide-assists/src/handlers/replace_named_generic_with_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use hir::{FileRange, Semantics};
2+
use ide_db::text_edit::TextRange;
23
use ide_db::{
34
defs::Definition,
45
search::{SearchScope, UsageSearchResult},
@@ -11,7 +12,6 @@ use syntax::{
1112
},
1213
match_ast, ted, AstNode,
1314
};
14-
use text_edit::TextRange;
1515

1616
use crate::{AssistContext, AssistId, AssistKind, Assists};
1717

src/tools/rust-analyzer/crates/ide-completion/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ base-db.workspace = true
2525
ide-db.workspace = true
2626
stdx.workspace = true
2727
syntax.workspace = true
28-
text-edit.workspace = true
2928
# completions crate should depend only on the top-level `hir` package. if you need
3029
# something from some `hir-xxx` subpackage, reexport the API via `hir`.
3130
hir.workspace = true

src/tools/rust-analyzer/crates/ide-completion/src/completions/item_list/trait_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
//! ```
3333
3434
use hir::{db::ExpandDatabase, HasAttrs, MacroFileId, Name};
35+
use ide_db::text_edit::TextEdit;
3536
use ide_db::{
3637
documentation::HasDocs, path_transform::PathTransform,
3738
syntax_helpers::prettify_macro_expansion, traits::get_missing_assoc_items, SymbolKind,
@@ -40,7 +41,6 @@ use syntax::{
4041
ast::{self, edit_in_place::AttrsOwnerEdit, make, HasGenericArgs, HasTypeBounds},
4142
format_smolstr, ted, AstNode, SmolStr, SyntaxElement, SyntaxKind, TextRange, ToSmolStr, T,
4243
};
43-
use text_edit::TextEdit;
4444

4545
use crate::{
4646
context::PathCompletionCtx, CompletionContext, CompletionItem, CompletionItemKind,

0 commit comments

Comments
 (0)