aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-03-22 12:38:59 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-03-22 12:38:59 +0000
commit708a7d24c5bfa3fd87d9b3b762d71c2a9916c6e1 (patch)
tree2241ded0c8a4a0c0b5abc719db2b81262bda6eff
parent6bc09e2ff82c588d3923aed3fe3c869e8aa70dc1 (diff)
parentfda70badf8957eba6650cc12d2f485d5e213bb82 (diff)
Merge #1017
1017: line_index and line_index_utils moved to ra_ide_api r=matklad a=pasa line_index and line_index_utils for issue #1009 Co-authored-by: Sergey Parilin <[email protected]>
-rw-r--r--Cargo.lock2
-rw-r--r--crates/ra_ide_api/Cargo.toml2
-rw-r--r--crates/ra_ide_api/src/lib.rs5
-rw-r--r--crates/ra_ide_api/src/line_index.rs (renamed from crates/ra_ide_api_light/src/line_index.rs)0
-rw-r--r--crates/ra_ide_api/src/line_index_utils.rs (renamed from crates/ra_ide_api_light/src/line_index_utils.rs)0
-rw-r--r--crates/ra_ide_api_light/src/lib.rs4
6 files changed, 8 insertions, 5 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 50fe1fa23..9c7afe74b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1005,6 +1005,7 @@ dependencies = [
1005 "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1005 "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
1006 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1006 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
1007 "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 1007 "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
1008 "proptest 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
1008 "ra_assists 0.1.0", 1009 "ra_assists 0.1.0",
1009 "ra_db 0.1.0", 1010 "ra_db 0.1.0",
1010 "ra_hir 0.1.0", 1011 "ra_hir 0.1.0",
@@ -1014,6 +1015,7 @@ dependencies = [
1014 "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 1015 "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
1015 "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1016 "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
1016 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1017 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1018 "superslice 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
1017 "test_utils 0.1.0", 1019 "test_utils 0.1.0",
1018 "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 1020 "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1019] 1021]
diff --git a/crates/ra_ide_api/Cargo.toml b/crates/ra_ide_api/Cargo.toml
index 40b7a8d0a..ac8c8057b 100644
--- a/crates/ra_ide_api/Cargo.toml
+++ b/crates/ra_ide_api/Cargo.toml
@@ -14,6 +14,7 @@ fst = "0.3.1"
14rustc-hash = "1.0" 14rustc-hash = "1.0"
15parking_lot = "0.7.0" 15parking_lot = "0.7.0"
16unicase = "2.2.0" 16unicase = "2.2.0"
17superslice = "1.0.0"
17 18
18jemallocator = { version = "0.1.9", optional = true } 19jemallocator = { version = "0.1.9", optional = true }
19jemalloc-ctl = { version = "0.2.0", optional = true } 20jemalloc-ctl = { version = "0.2.0", optional = true }
@@ -28,6 +29,7 @@ ra_assists = { path = "../ra_assists" }
28 29
29[dev-dependencies] 30[dev-dependencies]
30insta = "0.7.0" 31insta = "0.7.0"
32proptest = "0.9.0"
31 33
32[features] 34[features]
33jemalloc = [ "jemallocator", "jemalloc-ctl" ] 35jemalloc = [ "jemallocator", "jemalloc-ctl" ]
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs
index 81ca57035..35f38fbb7 100644
--- a/crates/ra_ide_api/src/lib.rs
+++ b/crates/ra_ide_api/src/lib.rs
@@ -33,6 +33,8 @@ mod impls;
33mod assists; 33mod assists;
34mod diagnostics; 34mod diagnostics;
35mod syntax_tree; 35mod syntax_tree;
36mod line_index;
37mod line_index_utils;
36 38
37#[cfg(test)] 39#[cfg(test)]
38mod marks; 40mod marks;
@@ -60,10 +62,11 @@ pub use crate::{
60 references::ReferenceSearchResult, 62 references::ReferenceSearchResult,
61 assists::{Assist, AssistId}, 63 assists::{Assist, AssistId},
62 hover::{HoverResult}, 64 hover::{HoverResult},
65 line_index::{LineIndex, LineCol},
66 line_index_utils::translate_offset_with_edit,
63}; 67};
64pub use ra_ide_api_light::{ 68pub use ra_ide_api_light::{
65 Fold, FoldKind, HighlightedRange, Severity, StructureNode, LocalEdit, 69 Fold, FoldKind, HighlightedRange, Severity, StructureNode, LocalEdit,
66 LineIndex, LineCol, translate_offset_with_edit,
67}; 70};
68pub use ra_db::{ 71pub use ra_db::{
69 Canceled, CrateGraph, CrateId, FileId, FilePosition, FileRange, SourceRootId, 72 Canceled, CrateGraph, CrateId, FileId, FilePosition, FileRange, SourceRootId,
diff --git a/crates/ra_ide_api_light/src/line_index.rs b/crates/ra_ide_api/src/line_index.rs
index bf004c33a..bf004c33a 100644
--- a/crates/ra_ide_api_light/src/line_index.rs
+++ b/crates/ra_ide_api/src/line_index.rs
diff --git a/crates/ra_ide_api_light/src/line_index_utils.rs b/crates/ra_ide_api/src/line_index_utils.rs
index 799a920ad..799a920ad 100644
--- a/crates/ra_ide_api_light/src/line_index_utils.rs
+++ b/crates/ra_ide_api/src/line_index_utils.rs
diff --git a/crates/ra_ide_api_light/src/lib.rs b/crates/ra_ide_api_light/src/lib.rs
index 47b30255b..556d44c25 100644
--- a/crates/ra_ide_api_light/src/lib.rs
+++ b/crates/ra_ide_api_light/src/lib.rs
@@ -4,8 +4,6 @@
4//! an edit or some auxiliary info. 4//! an edit or some auxiliary info.
5 5
6mod folding_ranges; 6mod folding_ranges;
7mod line_index;
8mod line_index_utils;
9mod structure; 7mod structure;
10#[cfg(test)] 8#[cfg(test)]
11mod test_utils; 9mod test_utils;
@@ -23,8 +21,6 @@ use ra_syntax::{
23 21
24pub use crate::{ 22pub use crate::{
25 folding_ranges::{folding_ranges, Fold, FoldKind}, 23 folding_ranges::{folding_ranges, Fold, FoldKind},
26 line_index::{LineCol, LineIndex},
27 line_index_utils::translate_offset_with_edit,
28 structure::{file_structure, StructureNode}, 24 structure::{file_structure, StructureNode},
29 join_lines::join_lines, 25 join_lines::join_lines,
30 typing::{on_enter, on_dot_typed, on_eq_typed}, 26 typing::{on_enter, on_dot_typed, on_eq_typed},